Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   utcnow (http://www.velocityreviews.com/forums/t952287-utcnow.html)

Nick the Gr33k 09-17-2012 04:25 AM

utcnow
 
Hello is there a better way of writing this:

date = ( datetime.datetime.utcnow() + datetime.timedelta(hours=3)
).strftime( '%y-%m-%d %H:%M:%S')

something like:

date = datetime.datetime.utcnow(hours=3).strftime( '%y-%m-%d %H:%M:%S')

i prefer it if it could be written as this.

Also what about dayligh savings time?


All times are GMT. The time now is 12:48 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.