How to read ISO 8601

ISO 8601 is a format of expressing a date with timezone information. I used to get confused after looking at dates like “2014-10-07T16:11:24-07:00”. Ok so you can tell it is 7th October 2014 and 4:24 PM. The -07:00 tells us the timezone which is UTC - 7 hours- all good. On the surface it looked easy but it was confusing for me.

Is it saying 4:24 at UTC and timezone where record created was UTC -07:00 or is the time 4:24 at the timezone UTC - 07:00 hrs? This confused me for quite a while. Well, the answer is that it is the later. Here’s an example is ruby:

time = Time.now.iso8601
=> "2014-10-07T16:11:24-07:00"

Means 4 11 PM in the timezone that is UTC - 7 hours

time = Time.now.utc.iso8601
=> "2014-10-07T23:15:08Z"

The Z(for Zulu) at the end indicates the timezone is UTC and time is 9 11 PM in that timezone.

 
3
Kudos
 
3
Kudos

Now read this

Hot Swapping of Tables in Hive

Here are the steps to hot swap a table in Hive when you manually load data in them. Hot Swapping the table allows you to refresh an entire table without any downtime thus making your table always available for querying. With this... Continue →