October 2006
Intermediate to advanced
888 pages
16h 55m
English
The accessor zone in the Time class returns a String representation of the time zone name.
z1 = Time.gm(2000,11,10,22,5,0).zone # "GMT-6:00" z2 = Time.local(2000,11,10,22,5,0).zone # "GMT-6:00"
Unfortunately, times are stored relative to the current time zone, not the one with which the object was created. If necessary, you can do a little arithmetic here.
Read now
Unlock full access