datatype for storing timezones
I want to store timezones but not in the开发者_StackOverflow中文版 timezoneoffset datatype. Should I use a decimal or a float? Or something else? Timezones can be GMT -3.5 for NewFoundland or +5.5 for parts of India so int wouldn't work.
Why not use a lookup table? It would look like this:
create table TimeZone (
id int identity primary key,
name varchar(50),
offset decimal(2,1)
)
With a foreign key reference from your main table.
精彩评论