This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2006年04月24日 09:40 by kxroberto, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg61229 - (view) | Author: kxroberto (kxroberto) | Date: 2006年04月24日 09:40 | |
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
|
|||
| msg83911 - (view) | Author: Daniel Diniz (ajaksu2) * (Python triager) | Date: 2009年03月21日 02:22 | |
Could you provide a test case and clearer description of your feature request? |
|||
| msg83928 - (view) | Author: kxroberto (kxroberto) | Date: 2009年03月21日 09:55 | |
(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.
|
|||
| msg116304 - (view) | Author: Alexander Belopolsky (belopolsky) * (Python committer) | Date: 2010年09月13日 13:46 | |
Would issue9527 address your request? Note that datetime.strftime already supports %z: >>> from datetime import * >>> datetime.now(timezone.utc).strftime('%c %z') 'Mon Sep 13 13:43:19 2010 +0000' (I assume you meant to write %c, not %C.) |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:17 | admin | set | github: 43269 |
| 2011年04月07日 19:56:22 | belopolsky | set | status: pending -> closed dependencies: - Add aware local time support to datetime module |
| 2011年01月08日 06:17:14 | belopolsky | set | status: open -> pending nosy: belopolsky, kxroberto, ajaksu2 superseder: Add aware local time support to datetime module resolution: rejected stage: test needed -> resolved |
| 2010年09月13日 13:46:05 | belopolsky | set | assignee: belopolsky dependencies: + Add aware local time support to datetime module messages: + msg116304 |
| 2010年08月09日 03:28:19 | terry.reedy | set | nosy:
+ belopolsky versions: + Python 3.2, - Python 3.1, Python 2.7 |
| 2009年03月21日 09:58:25 | kxroberto | set | title: compute/doc %z os-indep., time.asctime_tz / _TZ -> time.asctime_tz, time.strftime %z %C |
| 2009年03月21日 09:55:34 | kxroberto | set | messages: + msg83928 |
| 2009年03月21日 02:22:44 | ajaksu2 | set | versions:
+ Python 3.1, Python 2.7 nosy: + ajaksu2 messages: + msg83911 stage: test needed |
| 2006年04月24日 09:40:31 | kxroberto | create | |