Question

Has anybody used the jQuery Timeago plugin and able to give some advice?

I've got myself in a complete muddle working out timezones. I'm in the UK with GMT and Daylight Saving Time (DST), my server is in America using MST and I've been storing all my dates in the database as UTC (using MySQL's UTC_TIMESTAMP()). Yeah, confusing.

I want to use this plugin on all date fields that are returned from the database, so I know all dates that need converting, using Timeago, will be in UTC.

Now, will the Timeago plugin work out that I'm in a DST country and calculate the correct time difference automatically? Can you please enlighten me.

Was it helpful?

Solution

Does this quote help resolve anything (from http://timeago.yarp.com/)?

Are you concerned about time zone support? Don't be. Timeago handles this too. As long as your timestamps are in ISO 8601 format and include a full time zone designator (±hhmm), everything should work out of the box regardless of the time zone that your visitors live in.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top