Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information. import time time.mktime((1969, 12, 31, 17, 0, 0, 0, 0, 0))
3600.0 time.mktime((1969, 12, 31, 17, 0, 0, 0, 0, 1))
0.0 time.mktime((1969, 12, 31, 16, 0, 0, 0, 0, 1))
[crash with popup]
I got:
The instruction at "0x7802a7ff" referenced memory at "0x00000000". The memory
could not be "read".
I would have hoped for an informative ValueError exception.
This is on NT4. My local time zone is PST.
If I let the MSVC++6 debugger try to chase it, it says
Unhandled exception in python.exe (MSVCRT.DLL): 0xC0000005: Access Violation
and fwiw without source it's pointing to the rep movs in this context:
7802A7F1 call 7802A4BF
7802A7F6 pop ecx
7802A7F7 push 9
7802A7F9 mov esi,eax
7802A7FB mov eax,dword ptr [ebp+8]
7802A7FE pop ecx
7802A7FF rep movs dword ptr [edi],dword ptr [esi]
7802A801 pop edi
7802A802 pop esi
7802A803 pop ebp
7802A804 ret
7802A805 test ecx,ecx
and esi is zero, so I guess that did it.
Someone have a debug version to check this out?
Regards,
Bengt Richter 2 2463
Bengt Richter wrote: Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.mktime((1969, 12, 31, 17, 0, 0, 0, 0, 0)) 3600.0 >>> time.mktime((1969, 12, 31, 17, 0, 0, 0, 0, 1)) 0.0 >>> time.mktime((1969, 12, 31, 16, 0, 0, 0, 0, 1)) [crash with popup]
Curious. I get (windows XP):
Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information. import time time.mktime((1969, 12, 31, 17, 0, 0, 0, 0, 0))
Traceback (most recent call last):
File "<stdin>", line 1, in ?
OverflowError: mktime argument out of range time.mktime((1969, 12, 31, 17, 0, 0, 0, 0, 1))
Traceback (most recent call last):
File "<stdin>", line 1, in ?
OverflowError: mktime argument out of range time.mktime((1969, 12, 31, 16, 0, 0, 0, 0, 1))
Traceback (most recent call last):
File "<stdin>", line 1, in ?
OverflowError: mktime argument out of range
On Linux I get the same results. Something fishy is going
on with your Python...
--Irmen de Jong
On Wed, 19 Nov 2003 02:10:36 +0100, Irmen de Jong <irmen@-NOSPAM-REMOVETHIS-xs4all.nl> wrote: Bengt Richter wrote: Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.mktime((1969, 12, 31, 17, 0, 0, 0, 0, 0)) 3600.0 >>> time.mktime((1969, 12, 31, 17, 0, 0, 0, 0, 1)) 0.0 >>> time.mktime((1969, 12, 31, 16, 0, 0, 0, 0, 1)) [crash with popup]
Curious. I get (windows XP):
Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. import time time.mktime((1969, 12, 31, 17, 0, 0, 0, 0, 0))Traceback (most recent call last): File "<stdin>", line 1, in ? OverflowError: mktime argument out of range time.mktime((1969, 12, 31, 17, 0, 0, 0, 0, 1))Traceback (most recent call last): File "<stdin>", line 1, in ? OverflowError: mktime argument out of range time.mktime((1969, 12, 31, 16, 0, 0, 0, 0, 1))Traceback (most recent call last): File "<stdin>", line 1, in ? OverflowError: mktime argument out of range
On Linux I get the same results. Something fishy is going on with your Python...
Well, you're in a different time zone. I think you have to compensate for
that in setting up the equivalent of zero time epoch. Then hit that with dst=1.
Or there could be something fishy ;-)
Regards,
Bengt Richter This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Marcus |
last post by:
I am having some problems with trying to perform calculations on time
fields. Say I have a start time and an end time, 1:00:00 and 2:30:00
(on a 24 hour scale, not 12). I want to find the...
|
by: Benoit BESSE |
last post by:
Hi, I try to write a fonction which take a date and time and convert it into
a NTP time.
I have to use mktime but I did not work at all.
Here is my code dans the exécution.
Please help.
Thanks...
|
by: Hank |
last post by:
hi,
i have a string as follows
18Nov2003:18:23:43:405
Is there an easy way to convert that to absolute time? What i really
want to do is to parse these times from a log file and do time...
|
by: David Stockwell |
last post by:
I'm sure this has been asked before, but I wasn't able to find it.
First off I know u can't change a tuple but if I wanted to increment a time
tuple by one day what is the standard method to do...
|
by: Kyle Teague |
last post by:
I have a list of pointers to structs as a private member of a class.
If I call begin() in the same function as I added the data then no
access violation occurs. However, if I try to call begin() in...
|
by: George |
last post by:
In Time.h there is a structure defined for time settings. I'm
building an embedded system that has a Real Time Clock but it's not PC
compatible.
My question is:
I don't some elements of the...
|
by: BillyO |
last post by:
In the attached code fragment I have a buffer overflow and
a memory access violation. When I run the code .Net fails to
verify the IL because of the buffer overflow and I get an exception
as...
|
by: Joshua J. Kugler |
last post by:
I am getting results like these with the time module:
%S')))
1173610800
%S')))
1173610800
'2007-03-11 03:00:00'
I know it probably has something to do with daylight savings, but how can I...
|
by: alcool |
last post by:
hi,
I have 2 date/time values
i.e. the system date/time and (h:m dd:mm:yyyy). I would like know to
find a routine that calculate this difference. Maybe using the struct
time_t and difftime.
...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
|
by: SueHopson |
last post by:
Hi All,
I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...
| |