Python 2.2/Unix time.strftime("%T")
'22:12:15'time.strftime("%X")
'22:12:17'
Python 2.3/Windows
time.strftime("%X")
'22:12:47' time.strftime("%T")
''
Any clues?
A. 4 2871
Andy Leszczynski wrote: Python 2.2/Unix
>>time.strftime("%T") '22:12:15' >>time.strftime("%X") '22:12:17'
Python 2.3/Windows >>time.strftime("%X") '22:12:47' >> time.strftime("%T") ''
From http://docs.python.org/lib/node252.html
"""The full set of format codes supported varies across platforms,
because Python calls the platform C library's strftime() function, and
platform variations are common."""
So I suggest that it's a platform issue, not a Python version issue. FWIW:
Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright", "credits" or "license" for more information. import time time.strftime("%T")
'22:50:49' time.strftime("%X")
'22:50:59'
--
Robert Kern rk***@ucsd.edu
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
Robert Kern wrote: Andy Leszczynski wrote:
Python 2.2/Unix
>>time.strftime("%T") '22:12:15' >>time.strftime("%X") '22:12:17'
Python 2.3/Windows
>>time.strftime("%X") '22:12:47' >> time.strftime("%T") ''
From http://docs.python.org/lib/node252.html
"""The full set of format codes supported varies across platforms, because Python calls the platform C library's strftime() function, and platform variations are common."""
So I suggest that it's a platform issue, not a Python version issue. FWIW:
Python 2.4.1 (#2, Mar 31 2005, 00:05:10) [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.strftime("%T") '22:50:49' >>> time.strftime("%X")
'22:50:59'
I accept that, but still pain. Took me a while to filter out the problem
in the code running on the Unix and not on M$.
A.
Andy Leszczynski wrote: I accept that, but still pain. Took me a while to filter out the problem in the code running on the Unix and not on M$.
This is one of the reasons I usually use Cygwin Python when I can. Stuff
is much less likely to mysteriously break when moving from UNIX to
Cygwin then from UNIX to Windows.
--
Michael Hoffman
On Fri, 05 Aug 2005 01:02:48 -0500, Andy Leszczynski <leszczynscyATnospam.yahoo.com.nospam> wrote: Robert Kern wrote: Andy Leszczynski wrote:
Python 2.2/Unix
>>time.strftime("%T") '22:12:15' >>time.strftime("%X") '22:12:17'
Python 2.3/Windows
>>time.strftime("%X") '22:12:47' >> time.strftime("%T") ''
From http://docs.python.org/lib/node252.html
"""The full set of format codes supported varies across platforms, because Python calls the platform C library's strftime() function, and platform variations are common."""
So I suggest that it's a platform issue, not a Python version issue. FWIW:
Python 2.4.1 (#2, Mar 31 2005, 00:05:10) [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.strftime("%T") '22:50:49' >>> time.strftime("%X") '22:50:59'
I accept that, but still pain. Took me a while to filter out the problem in the code running on the Unix and not on M$.
I can imagine ...
By the way, you should probably /not/ change %T to %X.
%T (standardized in the Singe Unix Specification) is the same thing as ANSI
C %H:%M:%S which should be usable everywhere. %X on the other hand is "The
preferred time representation for the current locale without the date".
Not the same thing at all, for some users.
/Jorgen
--
// Jorgen Grahn <jgrahn@ Ph'nglui mglw'nafh Cthulhu
\X/ algonet.se> R'lyeh wgah'nagl fhtagn! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: John Hunter |
last post by:
>>> from datetime import date
>>> dt = date(1005,1,1)
>>> print dt.strftime('%Y')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: year=1005 is before 1900; the...
|
by: Turamnvia Suouriviaskimatta |
last post by:
I 'm following various posting in "comp.lang.ada, comp.lang.c++ ,
comp.realtime, comp.software-eng" groups regarding selection of a
programming language of C, C++ or Ada for safety critical...
|
by: Lorn |
last post by:
I was hoping some of you might be able to help me understand the
following code defining a typedef for a time query to the WINAPI. I
understand the basics of what's going on, I just don't...
|
by: Paul Janssen |
last post by:
Hello!
Can anyone help me out with the following situation:
(a) a single query with 550 id's in the IN-clause resulting into 800+
seconds;
(b) 550 queries with a single id in the IN-clause...
|
by: dananrg |
last post by:
Been using the ODBC module for Python 2.1 (Win32) and had another
question. When I return data from date columns, it's in a strange
object form, e.g. <something or other> (don't have the output in...
|
by: John Nagle |
last post by:
This, which is from a real web site, went into BeautifulSoup:
<param name="movie" value="/images/offersBanners/sw04.swf?binfot=We offer
fantastic rates for selected weeks or days!!&blinkt=Click...
|
by: Zytan |
last post by:
Obviously you can't just use a simple for loop, since you may skip
over elements.
You could modify the loop counter each time an element is deleted.
But, the loop ending condition must be...
|
by: Bruce Wood |
last post by:
SortedList<Tgeneric has most of the methods of the old SortedList
class, but it's missing a few, and one in particular that puzzles me.
Anyone know why it has no GetByIndex method?
It has...
|
by: jmcnamarw |
last post by:
I keep getting:
lr_strings.h (29): missing identifier
lr_strings.h (59): missing identifier
lr_strings.h (59): syntax error; found `0' expecting `;'
lr_strings.h (59): unrecognized declaration...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |