jokerbuilder / cortex-vfx

Automatically exported from code.google.com/p/cortex-vfx
0 stars 0 forks source link

SequenceLsOpTest failure in certain timezones #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run the SequenceLsOpTest in a timezone other than PST?

Here's the report from Ash :

As you requested i've looked more closely at the timestamps thing.
Here is what i think is wrong and lead to the FAIL message during the
tests.

In the test source code there is two times that are
"captured" (SequenceLsOpTest.py) :
now = datetime.datetime.now()
oneHourAgo = now + datetime.timedelta( hours = -1 )

For me (in France), right now it means roughly now=9.00PM and
oneHourAgo=8.00PM

During the filtering process here the line that is used to get the
reference timestamp of the newly created files (SequenceLsOp.py) :
st = os.stat( sequenceFile )
modifiedTime = datetime.datetime.utcfromtimestamp( st.st_mtime )

Which means in UTC time roughly 7.00PM (as the files are created at
the same time than now variable is filled). In that case the
difference between the French time and the UTC time is more than one
hour ahead, so the file are always created before the oneHourAgo
value.

In your case, i think you are in Vancouver right ? It means roughly
that now=12.00PM and oneHourAgo 11.00AM. It's working the files are
created at 7.00PM, it's not before 11.00AM and it is after 11.00AM.

I guess this source code does not work on this side of the Ocean  :)  It
does not work either on your side if the values that your are using
are lower than the difference between the Vancouver time and the UTC
time, but the test does not fail in that case.

Original issue reported on code.google.com by thehaddo...@gmail.com on 20 Sep 2010 at 4:43

GoogleCodeExporter commented 9 years ago

Original comment by john.ima...@gmail.com on 20 Sep 2010 at 4:46

GoogleCodeExporter commented 9 years ago

Original comment by john.ima...@gmail.com on 20 Sep 2010 at 4:47

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r4099.

Original comment by john.ima...@gmail.com on 16 Feb 2011 at 6:21

GoogleCodeExporter commented 9 years ago
Yes!

Original comment by danbeth...@gmail.com on 16 Feb 2011 at 11:22