U = t.getlocal(TZInfo::Timezone. To get the correct time, I gem install tzinfo and run require 'time' ![]() Pacific Standard Time (PST) is UTC-8:00, and Pacific Daylight Time (PDT) is. The correct local time would be 7 PM PDT. Here you can convert another Eastern Standard Time (EST) to Central Standard. ![]() Why 6 PM and not 7 PM? Time.zone_offset('PST') uses an obsolete list of time zones from RFC 2822, where Pacific Standard Time PST is 8 hours before UTC, and Pacific Daylight Time is 7 hours before UTC. ![]() This assumes the USA and may have trouble with Daylight Saving Time: require 'time' The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since Janu(midnight UTC/GMT), not counting.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |