Site Sponsors:
Passable 'RFC 2822' Localtime in Python 3 
Time ... you would think that it would be easy to express on a computer... What could be more natural than counting the number of seconds?

Yet after decades of computerization, we are still 'haggling over the proper way to express time!

Here is what we cobbled together while creating a client-side API for the new, R&D, AboutTime HTML Server:

import datetime
from email import utils

zdt = datetime.datetime.now() # Omits the GMT Offset
print(zdt)
zlocal = utils.localtime(zdt) # Adds the official GMT Offset
print(zlocal)
localtime = utils.format_datetime(zlocal) # RFC 2822-ish
print(localtime)

... and here is the output:

/usr/bin/python3.5 .../Python3/AboutTime_API/CreateTest.py
2017-12-13 08:02:20.817119
2017-12-13 08:02:20.817119-05:00
Wed, 13 Dec 2017 08:02:20 -0500

Then, as one becomes interested in Zulu / Server Time:

# ZULU!
zdt = datetime.datetime.utcnow() # Omits the GMT Offset
print(zdt)
zulutime = utils.format_datetime(zdt) # RFC 2822-ish
print(zulutime)

Results:

2017-12-13 13:02:20.817251
Wed, 13 Dec 2017 13:02:20 -0000

Sharing is caring!

-Randall





Google candy: GMT, UTC, Epoch time, conversion, email, RFC 822



[ add comment ]   |  permalink  |  related link
New Project: AboutTime ... for the 'Web! 
The work on cleaning up those awful WikiQuotes lead me to coin the word 'Quotie,' as well as to pop-out a web UI.

Dedicated to cleaning up such a horrid morass, this week the brain-wave was to refactor that C.R.U.D so as to support my original time-tracking and invoicing efforts.

Known as "AboutTime," the name was originally applied to an on-line Applet.

Created before I served as the Consulting Technical Section Leader at the United States Electronic Proving Ground (EPG/DTC) I used the Applet to allow my section & I to better manage their time at Fort Huachuca.


Today's R&D Release


Migrated to a stand-alone desktop application after Java's Applet security 'sandbox' melt-down, this week's return to the 'Web marks our official return to maintaining a truly collaborative, time-tracking, tool set.


(zDesktop - free on Sourceforge)


Our plans are to merge the 'Desktop and 'Web together so as to create a free & open logging / time management tool.

If you would like to support our efforts, then feel free to purchase a copy of our new book, or one of our on-line training offerings?

Sharing is caring!


[ add comment ] ( 16 views )   |  permalink  |  related link
The Quote For Today "Quick Quote Review" 
Tossed this together last week. Shared today: The Quick Quote Review Sub-System.



A generic version of my source code for the web site is here.



Extremely cross-platform HTML5 + CSS3 design... Even works great on my iPhone & Android devices!

Academic Free Use.



[ add comment ] ( 48 views )   |  permalink  |  related link

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next> Last>>