Questions tagged [gmt]

Greenwich Mean Time (GMT) is a term originally referring to mean solar time at the Royal Observatory in Greenwich, London.

Greenwich Mean Time (GMT) originally referred to mean solar time at the Royal Observatory in Greenwich, London, which later became adopted as a global time standard. It is arguably the same as Coordinated Universal Time (UTC).

Related tag:

Useful Links:

UK: GMT

USA: GMT-5 --- GMT -10

448 questions
3
votes
2 answers

Easy way to generate http date (GMT) string in ruby

I need to generate an HTTP (GMT) date string in Ruby. This is because of a requirement of an API that I'm consuming. What is an easy (out of the box) way to generate it?
Tonatiuh
  • 2,205
  • 1
  • 21
  • 22
3
votes
2 answers

Why there are 26 GMT offsets?

This question may be silly but I can't figure out why. I want to list all of GMT offsets. There are only 24 hours a day so I thought there are only 24 GMT+/-. But I found out there are 26 GMT+/- (GMT, GMT-1 to GMT-12, GMT+1 -> GMT+14) Please see…
LHA
  • 9,398
  • 8
  • 46
  • 85
3
votes
3 answers

What is the difference between the current timestamp in the GMT time zone and the current timestamp in your local time zone?

This is a sample question i found at ZEND php certificate practice test, the correct answer of this question is: " There is no difference between the current time in any time zone—the current time is an absolute point in time! " This answer is very…
3
votes
1 answer

Confusion when converting date from GMT+1 to UTC in Swift

When trying to convert "2016-06-23 12:00:00" to a UTC Date I get "2016-06-23 10:00:00" The first Date is in GMT+1 which I want to convert to UTC. If I'm not mistaken GMT+0 == UTC so 12:00 should be 11:00 right? But I always get 10:00. Why is that…
abcdefg
  • 33
  • 1
  • 4
3
votes
1 answer

Convert GMT+ date to local on android

I need to convert date like Mon Nov 14 13:36:01 GMT+03:00 2016 to local. So it must be 16:36:01 Date serverDate; // Mon Nov 14 13:36:01 GMT+03:00 2016 SimpleDateFormat dateFormat = new SimpleDateFOrmat("hh:mm:ss"); String result =…
Andrew F
  • 1,712
  • 2
  • 15
  • 24
3
votes
2 answers

Get the GMT time given date and UTC offset in python

I have a date string of the following format '%Y%m%d%H%M%S' for example '19981024103115' and another string of the UTC local offset for example '+0100' What's the best way in python to convert it to the GMT time So the result will be '1998-10-24…
Eyal
  • 137
  • 3
  • 9
3
votes
2 answers

Why is JavaScript guessing two different timezones based on strings that are identical in structure?

I am providing dates two to my script in this format: 2016-05-25 12:30:02. However, JavaScript is setting the each date to a different GMT offset. I formatted the dates to match the suggested answer here and added the function provided, but I got…
tylersDisplayName
  • 1,603
  • 4
  • 24
  • 42
3
votes
2 answers

fast Java 6 implementation for getting UNIX Timestamps in GMT

I'm looking for a Java 6 compatible way of generating Seconds since epoch in GMT / UTC (aka UNIX Timestamp) out of a java.sql.Date Object. My Java 8 code is: Long seconds = dateObject.toLocalDate().atStartOfDay(ZoneId.of("GMT")).toEpochSecond() My…
Olli
  • 689
  • 1
  • 6
  • 13
3
votes
1 answer

NSDate - GMT on iPhone

I have the following code in a production application which calculates a GMT date from the date the user enters: NSDate *localDate = pickedDate; NSTimeInterval timeZoneOffset = [[NSTimeZone defaultTimeZone] secondsFromGMT]; // You could also use…
Mick Walker
  • 3,862
  • 6
  • 47
  • 72
3
votes
1 answer

Get the current german time in JavaScript

I would like to get the currently german time in JavaScript. Normally its GMT+1 but german time consists of the winter time and the summer time. In the summer time we are 1 hour ahead. var now = new Date(); var hour = now.getUTCHours() + 1; // it…
user1643936
  • 45
  • 1
  • 5
3
votes
5 answers

How to find out GMT offset value in android

How to find out the values of GMT for user for example it is +05:30 for India. How do calculate this +05:30 value in Android ? I need this because I am using a java library in my app which has a function with this +05:30 field and I want to…
user3671032
  • 211
  • 2
  • 16
3
votes
2 answers

How do i get GMT time in ios?

I know it's a repeating a question , but i didn't get solution from those answer's . please can anybody tell me , How do I get GMT in ios , if the device time is wrong also . Thanks in advance
Shaik Riyaz
  • 11,204
  • 7
  • 53
  • 70
3
votes
3 answers

A bizarre phenomenon in my java program

I found a bizarre phenomenon in my java program at runtime, just look at my code: System.out.println(" date " + new Date(1359931355141L).toGMTString() ); the output by this statement was "date 3 Feb 2013 22:42:35 GMT", and System.out.println("…
user718146
  • 400
  • 1
  • 4
  • 16
3
votes
6 answers

Get Greenwich Mean Time

India Standard Time (IST) is 5:30 hours (5 hours 30 minutes) ahead of Greenwich Mean Time. We show it as GMT+5.5. Is there any way to find this value (in above case, value = 5.5) by time zone? In my android app, I can get device time zone. But how…
Bishan
  • 15,211
  • 52
  • 164
  • 258
3
votes
2 answers

Convert GMT time local time in XSLT

How to convert GMT time to local time ( MDT or MST ) automatically. I got this below working but i need a condition which determines utc -6 or utc -7 based on dates.
hari
  • 31
  • 1
  • 6