jeudi 13 juillet 2017

Change date with offset value to UTC. Ruby

I have this date that which is in timezone offset format that I need to convert to UTC format. For example:

date1 = 2017-07-13T17:13:12-04:00

date2_utc = 2017-07-13 21:13:12 UTC

I need to compare if those two date are same date. Or If I can convert date1 to UTC then i can compare those two.

Aucun commentaire:

Enregistrer un commentaire