Questions tagged [timezone-offset]

A time zone offset describes the difference between a "wall time" and UTC. General questions about time zones will get better visibility when tagged with 'timezone'.

A time zone offset describes the difference between a "wall time" and UTC.

Time zones can change their offsets for many reasons, including daylight saving time. Therefore, an offset is not the same thing as a time zone, and It is only valid for the specific instant it is associated with.

General questions about time zones will get better visibility when tagged with .

See also the timezone tag wiki.

1036 questions
16
votes
3 answers

Adding Time Offset in Swift

I have a bunch of different show times in a database and want to display the correct time based on the users time zone by creating an offset. I'm getting the users time zone offset from GMT and converting that to hours…
Keith
  • 1,969
  • 4
  • 17
  • 27
16
votes
1 answer

Angular JS - Date changes when submitting to $http - Timezone issue

I am having a strange problem where a Date changes when it is passed to API through $http.put, I suspect a timezone issue: Datepicker triggers ng-change event - console.log: Tue Jun 10 2014 00:00:00 GMT+0100 (GMT Summer Time) Passed to API using…
15
votes
2 answers

Converting Between Timezones in Postgres

I am trying to understand the timestamps and timezones in Postgre. I think I got it, until I red this article. Focus on the "Converting Between Timezones" part. It has two examples. (Consider the default timezone configuration to be UTC.) Example…
slevin
  • 4,166
  • 20
  • 69
  • 129
15
votes
3 answers

How to convert time correctly across timezones?

Let's say user in CA, US picks up a date, time and timezone: Worldwide beer marathon starts on 8/15/2013 10:00 am, UTC-08:00 Another user, in Central Europe opens the page where this date and time is displayed. He doesn't want to do time…
rdamborsky
  • 1,920
  • 1
  • 16
  • 21
14
votes
1 answer

ISO 8601 date-time format combining 'Z' and offset of '+0000'

I'm playing with date-time format from ISO 8601. I have this pattern: "yyyy-MM-dd'T'HH:mm:ssZZ'Z'" and the output is: "2015-11-17T00:00:00+0000Z" My question is if the output is ok, if is possible to have in a date +0000 and Z taking in account…
Zilev av
  • 491
  • 1
  • 7
  • 21
14
votes
3 answers

Time zone conversion in SQL query

I am using a query to get some application Received Date from Oracle DB which is stored as GMT. Now I have to convert this to Eastern standard/daylight savings time while retrieving. I am using the below query for this: select to_char…
satyanarayana
  • 379
  • 1
  • 5
  • 19
14
votes
4 answers

PHP & MySQL: Converting Stored TIMESTAMP into User's Local Timezone

So I have a site with a comments feature where the timestamp of the comment is stored in a MySQL database. From what I understand, the timestamp is converted to UTC when stored, then converted back to the default timezone when retrieved. In my case,…
TerranRich
  • 1,263
  • 3
  • 20
  • 38
13
votes
5 answers

strtotime('today') returning incorrect time?

I am trying to create a select list starting from the current date of the user. I want it so that it is set to midnight in unix timestamp format. This is all I'm doing: $today = strtotime('today'); echo $today; This is my result: 1333144800 which…
Johnathan Au
  • 5,244
  • 18
  • 70
  • 128
13
votes
1 answer

Get timezone difference in hours with moment

I would like to get the timezone difference between New York and Hong Kong with Node.js moment module. I have done some preliminary work. var NewYork_time_hr = moment().tz("America/New_York").format('HH'); var HongKong_time_hr =…
guagay_wk
  • 26,337
  • 54
  • 186
  • 295
13
votes
2 answers

Java 8 timezone conversions

In Java 8, I want to convert a datetime from UTC to ACST (UTC+9:30). input -> 2014-09-14T17:00:00+00:00 output-> 2014-09-15 02:30:00 String isoDateTime = "2014-09-14T17:00:00+00:00"; LocalDateTime fromIsoDate = LocalDateTime.parse(isoDateTime,…
Javide
  • 2,477
  • 5
  • 45
  • 61
12
votes
3 answers

PHP: DateTime::createFromFormat() with timezone

I want to convert date form from d/m/Y to Y-m-d with timezone offset. I am able to convert from d/m/Y to Y-m-d with this code: $date = DateTime::createFromFormat('d/m/Y', $date); $date = $date->format('Y-m-d'); But I am not sure how to add the…
yoshi
  • 1,287
  • 3
  • 15
  • 28
12
votes
1 answer

How is timezone EST different from EST5EDT?

How different is EST from EST5EDT ? Isn't EST take into account DST? I wrote a small java snippet to figure out the difference and output says EST5EDT takes in to account DST while EST does not SimpleDateFormat dateFormat = new…
Jeevan
  • 8,532
  • 14
  • 49
  • 67
12
votes
1 answer

Wrong Olson Timezone Offsets?

Today I noticed that my script to convert and display Olson timezone IDs into Cities and GMT offsets was producing some very weird results: Argentina zones caught my attention because they were displaying a standard (non-DST) time offset of ±0000 in…
Alix Axel
  • 151,645
  • 95
  • 393
  • 500
11
votes
1 answer

Time zones `Etc/GMT`, why it is other way round?

Time zones in php work like this https://www.gsp.com/support/virtual/admin/unix/tz/gmt/ and when it named Etc/GMT+11 it actually GMT-11 and when it named Etc/GMT-11 it actually GMT+11 Why? And what does it mean Etc/GMT? I find it in PHP, is it a bug…
Yevgeniy Afanasyev
  • 37,872
  • 26
  • 173
  • 191
10
votes
3 answers

How can I write an ISO 8601 date with a timezone but no time component

An ISO 8601 datetime with a timezone is formatted like this: 2018-09-07T05:28:42Z However, I need to represent some dates in my system where the precision is days, not seconds, which means that it would be an ISO 8601 calendar date. Calendar dates…
Josh Glover
  • 25,142
  • 27
  • 92
  • 129
1 2
3
68 69