timezonedb将gmt_offset转换为+5:30格式?

时间:2012-05-25 12:05:39

标签: javascript time timezone

这是我的链接:

http://timezonedb.com/download

 timezone.csv
 Fields: "zone_id","abbreviation","time_start","gmt_offset","dst"


"370","CDT","-273686400","-18000","1"    
"370","EST","-266432400","-18000","0"
"370","EDT","-52938000","-14400","1"    
"370","EST","-37216800","-18000","0"
"370","EDT","-21488400","-14400","1"
"370","EST","-5767200","-18000","0"
"370","EDT","9961200","-14400","1"
"370","EST","25682400","-18000","0"
"370","EDT","41410800","-14400","1"
"370","EST","57736800","-18000","0"

你可以看到,它把时间相关的数据作为一些大数字,我怎么能把它转换成格式“utc + 5:30”小时那样...... 感谢

1 个答案:

答案 0 :(得分:1)

除以3600(一小时内的秒数)以获得UTC偏移量(小时)