Hi.
I am in Asia/Karachi timezone and am testing my application for US/Pacific 
timezone. Here is the scenario:
The *system time* that I've set is,
    2016-03-24 18:02:58
    and the timezone is US/Pacific

When I use the *Python interpreter* to print the datetime, I get 
>>> print datetime.datetime.now()
2016-03-24 18:02:58.814000
>>> print datetime.datetime.utcnow()
2016-03-25 01:02:58.814000

Which is correct. But when I use my *web2py application* to print the same 
I get,
print datetime.datetime.now()       # 2016-03-25 06:02:58.814000
print datetime.datetime.utcnow()  # 2016-03-25 01:02:58.814000

So, the problem is that the two datetime.now() results do not match. For 
some reason, the application is returning a datetime which is 12 hours 
ahead of what it should actually return. I'm facing this issue on a Windows 
machine; but on Linux Mint, I'm getting correct results.
This seems like its a tricky one, who's up for a challenge? : )

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to