Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

How to set correct time

Kenneth Love Hello sir i just complete the social network course with flask but i'm not able to figure out hoe to set correct time its was showing me on every post that it was posted 46 years ago why?

1 Answer

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

That should only be affected by the date and timezone that are set on your server/computer. I don't know of any settings in Flask (and the docs didn't reveal any) that are related to timezones. If you run date on your server, does it return the right date and time?

No it was not returning the right time. I found some solution on flask's site but I'm not able to understand may you can

http://flask.pocoo.org/snippets/33/