caljer1 / auto-repair-shop

Automatically exported from code.google.com/p/auto-repair-shop
0 stars 0 forks source link

Date/Time should be PST base, not GMT based #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a new work order after 5PM 
2. The date will be a day later, reflecting the 7-hr difference
   between PST and GMT
3. Alternately, enter a work order and observe the time in the data viewer: 
I entered a work order 2009-06-12 20:03:09.224487   here in Silicon Valley.
Data Viewer shows the date as 
2009-06-13 03:03:09.224487
which is GMT

What is the expected output? What do you see instead?
I expected Silicon Valley time (PST) not GMT
In general, the user wants to see his local time/date

It is especially visible when the 7-hour time difference changes the date
to the next day.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by Les.Faby.78@gmail.com on 13 Jun 2009 at 3:10

GoogleCodeExporter commented 9 years ago
http://docs.python.org/library/datetime.html discusses timezones and python 
datetime

Original comment by Les.Faby.78@gmail.com on 13 Jun 2009 at 3:15

GoogleCodeExporter commented 9 years ago
import time
# secs per hr=3600
print time.timezone/3600
8
print time.daylight
1

Original comment by Les.Faby.78@gmail.com on 13 Jun 2009 at 3:27

GoogleCodeExporter commented 9 years ago
during daylight savings time, the difference between GMT and Pacific DST is one 
hour
less (7 vs 8)

Original comment by Les.Faby.78@gmail.com on 13 Jun 2009 at 3:29

GoogleCodeExporter commented 9 years ago
It looks to me like I should have gotten the time using datetime.now() rather 
than
datetime.fromtimestamp(time()).  This is an easy change.

Does this look right to you guys?

Original comment by bd.gai...@gmail.com on 13 Jun 2009 at 3:41

GoogleCodeExporter commented 9 years ago
Les, is this really an issue?  I ran a test case using the date conversion 
routines
and both a version using now() and the original version are printing local time 
on my
machine.  The other thing that we should realize is that since all date setting 
and
formatting is being done server side, we probably would need to work harder to 
get
the information needed to establish a time difference between the client and 
server
to format dates for the client's local time.  I know client browsers send 
through a
bunch of information to the server, so we may be able to handle this.

Original comment by bd.gai...@gmail.com on 14 Jun 2009 at 6:13