You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Very often I need (for logging purposes, legal
international action confirmation display, ...) quickly
a stable/constant/technical/international timezone info
in addition to %c / .asctime. And find me regularly
checking if the computer/server displays %Z nice,
writing 10-liner funcs ...
found %z by trial (and in footnote)
yet time.strftime('%c %z') flickers (on Windows..)
think, %z can be computed very easily independent of OS
libs? time.altzone /% 3600 ... ==> "+/-HHMM" ?
that could be doc'ed.
( the sign of time.timezone / time.altzone is
unfortunately revers of RFC standardds , yet its ok
doced. there should be a function/update-function for
long running apps also ? )
then .asctime_tz() would be very nice to find it in the
docs. (and maybe asctime_TZ)
Could you provide a test case and clearer description of your feature
request?
kxroberto commented on Mar 21, 2009
kxrobertomannequin
MannequinAuthor
More actions
(I'm somewhat away from all that currently - and not aware if newest
Python versions already solved but:)
a "time.asctime_tz([tim])" or so should deliver a full OS-indep.
_world_ time string incl. numeric timezone info like
"Sat Mar 21 10:33:36 2009 +0000"
It should accept a 10-tuple (like urlopen_file.info().getdate_tz('date'),
or a time.time() float time,
or interpret a 9-tuple as GMTIME/UTC.
strftime("%z") should be supported on all OS - _constant numeric_
format "+0000"
strftime("%C",[tim]) should be like asctime_tz.
it should accept as 2nd parameter a 10-tuple alternatively,
or a time.time() universal float time,
or interpret the 9-tuple as LOCALTIME as it were.
test cases to add:
simple render a variation of constant tuples/float_times to constant
result strings.
Activity
kxroberto commentedon Apr 24, 2006
Very often I need (for logging purposes, legal
international action confirmation display, ...) quickly
a stable/constant/technical/international timezone info
in addition to %c / .asctime. And find me regularly
checking if the computer/server displays %Z nice,
writing 10-liner funcs ...
found %z by trial (and in footnote)
yet time.strftime('%c %z') flickers (on Windows..)
think, %z can be computed very easily independent of OS
libs? time.altzone /% 3600 ... ==> "+/-HHMM" ?
that could be doc'ed.
( the sign of time.timezone / time.altzone is
unfortunately revers of RFC standardds , yet its ok
doced. there should be a function/update-function for
long running apps also ? )
then .asctime_tz() would be very nice to find it in the
docs. (and maybe asctime_TZ)
-robert
devdanzin commentedon Mar 21, 2009
Could you provide a test case and clearer description of your feature
request?
kxroberto commentedon Mar 21, 2009
(I'm somewhat away from all that currently - and not aware if newest
Python versions already solved but:)
a "time.asctime_tz([tim])" or so should deliver a full OS-indep.
_world_ time string incl. numeric timezone info like
"Sat Mar 21 10:33:36 2009 +0000"
It should accept a 10-tuple (like urlopen_file.info().getdate_tz('date'),
or a time.time() float time,
or interpret a 9-tuple as GMTIME/UTC.
strftime("%z") should be supported on all OS - _constant numeric_
format "+0000"
strftime("%C",[tim]) should be like asctime_tz.
it should accept as 2nd parameter a 10-tuple alternatively,
or a time.time() universal float time,
or interpret the 9-tuple as LOCALTIME as it were.
test cases to add:
result strings.
[-]compute/doc %z os-indep., time.asctime_tz / _TZ[/-][+]time.asctime_tz, time.strftime %z %C[/+][-]compute/doc %z os-indep., time.asctime_tz / _TZ[/-][+]time.asctime_tz, time.strftime %z %C[/+]abalkin commentedon Sep 13, 2010
Would bpo-9527 address your request? Note that datetime.strftime already supports %z:
(I assume you meant to write %c, not %C.)