|
Hello, I'm thinking about to store dates on user login in my site, but I don't know what is the most logical solution.
Initially, I though to use server timezone, and then to manage it using difference operations between server machine date and user machine...
Started by Vittorio Vittori on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I'd recommend using server timezone or UTC, rather than storing different data for each user without having to, for each entry, fetch the *user_timezone* column and perform the conversion (which timezone may be tempting, DST rules....
|
|
I have a few places in the code where I need to use the TimeZone. I can get the timezone name using DateTime::TimeZone . Is it reasonable to put the timezone name in a constant? Or should it be in a variable?
Started by Tom Feiner on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
It happened....
You could end up that could ever happen.
I vote for variable.
The user can change the timezone and it would be nice if the program behaves accordingly.
For a timezone, the chance it will change is not big, but it is also not 0.
|
|
I just noticed something really nice on the Google Analytics signup page for adding a new domain. First you pick a country them you pick your timezone. Instead of showing a huge Timezone list though they populate the timezone list with only timezones ...
Started by jasondavis on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Probably the best way to go would be to throw all this data into a database table and use some AJAX magic... .
You would simply group by the Country code column.
You can construct the data you want from this table: http://www.datelib.de/Timezones.shtml.en .
|
Ask your Facebook Friends
|
How well does Django handle the case of different timezones for each user? Ideally I would like to run the server in the UTC timezone (eg, in settings.py set TIME_ZONE="UTC") so all datetimes were stored in the database as UTC. Stuff like this scares ...
Started by Nick Sonneveld on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Not a Django Malcom Tredinnick's advice in this django....
Of timezone-based model fields (and their corresponding form fields, and some decorators), which you could use to at least store different timezone values per user (if nothing else).
|
|
Echo timezone_name_from_abbr("", 3600*7, 0); //ok
echo timezone_name_from_abbr("", 3600*8, 0); //NOT ok! return nothing!
echo timezone_name_from_abbr("", 3600*9, 0); //ok
Started by lovespring on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
By timezone_name_from_abbr
This report corresponds exactly to the bug you are having.
|
|
I have an application that stores GMT time data in a MySQL db like this: 2009-12-16 15:27:47.
The user's timezone offset is stored in another column like this: -6
The above timezone is GMT-6, which is CST. Is there any way I can echo CST (i.e. - date(...
Started by Josh on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Also, I would suggest storing the timezone identifier instead of the GMT offset, but I'm guessing your the timezone without....
Many GMT offsets have multiple timezones.
There isn't always a single timezone for each GMT offset.
|
|
How to get regional timezone on Compact Framework and then convert UTC date to local date?
Started by Pentium10 on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
P/Invoke GetTimeZoneInformation to get the current timezone biases, then use those to offset.
|
|
Does MySQL's NOW() follow the system's timezone or some standard like GMT or UTC?
Started by jeffreyveon on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
To "current session's timezone" (which defaults to system timezone):
The current session time zone setting.
|
|
I need a way to detect the timezone of a given date object. I do NOT want the offset, nor do I want the full timezone name. I need to get the timezone abbreviation. For example, GMT, UTC, PST, MST, CST, EST, etc...
Is this possible? The closest I've gotten...
Started by spudly on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Try Google's Closure ....
This script will do abbreviations for US timezones, but I don't know of one that handles international timezones.
If all else fails, you can simply create your own hashtable with the long names and abbreviations .
|
|
I'm using postgresql 8.3 and i would like to know the timezone of a particular timestamp (a column in a table).
In the documentation i've found the keyword "timezone"
But i don't understand how to apply it in a column of table. Is it possible ?
Started by egesuato on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Sample (I live in Germany, actual timezone ist GMT+1 / CET ):
test=# select '2008-01-01 12:00:00 GMT+5'::....
Use:
SELECT EXTRACT(TIMEZONE FROM ct) FROM t;
to get the offset of the timezone in seconds on your TIMEZONE setting.
|