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
6
votes
1 answer

Get GMT Offset from 'gmt_offset' option in wordpress

I'm not perfect in PHP, I'm trying to show user's current timezone in wordpress site. User selected GMT Timezone is: UTC+5.30 but get_option('gmt_offset') returns '5.5' How to get this '5.5' GMT offset as 'UTC+5.30' ?
Disapamok
  • 1,426
  • 2
  • 21
  • 27
6
votes
5 answers

How to make Date locale-independent?

I have a db, that stores dates in OleDateTime format, in GMT timezone. I've implemented a class, extending Date in java to represent that in classic date format. But my class is locale-dependent (I'm in GMT+2). Therefore, it converts the date in the…
George
  • 8,368
  • 12
  • 65
  • 106
6
votes
2 answers

Emacs and Git show wrong time on Windows

Emacs is two hours off from the system time. I tried to google for the problem, but no luck. What do I need to configure to correct this? I suspect this to be the difference from GMT to where I live (I'm in GMT+2 zone, that is, if I subtract from…
user797257
6
votes
1 answer

Java Sending Email to Different Time Zones At the Same Time Each Day

Turns out this seems to be a complex subject, please tell me if my approach is too simple. Basically what i'm trying to do is send an email reminder to a list of users (only when they have a reminder coming up, but that is besides the point) at 7 am…
ryandlf
  • 27,155
  • 37
  • 106
  • 162
6
votes
4 answers

How do I get time_t in GMT on Windows in C

I am writing some code that will run on multiple intercommunicating systems. I was using time() to get time_t, but this was causing problems with time zone differences between the systems, so I want to get time_t in GMT. I've been looking through…
Derek
  • 3,087
  • 1
  • 21
  • 23
5
votes
8 answers

Java time in GMT

I have a Grails application with the following code: Date now = Calendar.getInstance().getTime() //Also tried new Date() println "now: " + now When I do this, I get now: Thu Aug 18 12:47:09 CDT 2011. I need the date to be in GMT, not local time…
Mike Caputo
  • 1,156
  • 17
  • 33
5
votes
2 answers

Converting UTC time field from a POSTGRE/SQL database in SQL

I am having a problem from my database. I never been used to work in PostgreSQL, and i would like to make a select from a UTC datetime field and getting a GMT Datetime as result. Actually my request is : select dateheure from position What should…
Gwenael
  • 137
  • 1
  • 2
  • 7
5
votes
3 answers

Convert GMT DateTime String

I am pretty new to Java and I am a little stuck with using SimpleDateFormat and Calendar. I have a Date-Object and want to extract a GMT datestring like yyyy-MM-dd HH:mm:ss. I live in Germany and at the moment we are GMT +0200. My Date-Object's time…
Marco
  • 960
  • 2
  • 7
  • 26
5
votes
2 answers

How can I get or print current datetime of GMT time zone in Python?

Here I print UTC time zone's current datetime. I want current GMT time zone's datetime by this method. How can I? import datetime dt_utcnow = datetime.datetime.utcnow() print(dt_utcnow) Output 2020-08-31 09:06:26.661323
user13311456
5
votes
1 answer

Are struct stat times GMT?

One of the fields in struct stat is st_mtime. I assume that is seconds since jan 1, 1970. Is that GMT or local time?
johnnycrash
  • 5,184
  • 5
  • 34
  • 58
5
votes
3 answers

"Java Date() returns date in UTC" - what does it actually mean?

My question might be trivial but I'm just looking for clarifications. I read somewhere in SO that Java's Date() is actually always in UTC time, how come when I create a Date() object and print it using toString(), it displays the local time. If this…
jasonline
  • 8,646
  • 19
  • 59
  • 80
5
votes
1 answer

How to print current GMT time in a specific format in python

The format I have been given yyyy-MM-dd'T'HH:mm:ss.SSS'Z'. However, this isn't working with my code which is datetime.utcnow().strftime("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") The output is simply: yyyy-MM-dd'T'HH:mm:ss.SSS'Z' Why does this not work?…
tsaebeht
  • 1,570
  • 5
  • 18
  • 32
5
votes
4 answers

Convert historic dates from utc to local time

I have an sql table with data like this: | theDate (datetime) | theValue (int) | ---------------------------------------- | 2010-05-17 02:21:10 | 5 | | 2009-03-12 04:11:35 | 23 | | 2010-02-19 18:16:53 | 52 | |…
Espo
  • 41,399
  • 21
  • 132
  • 159
4
votes
2 answers

Difference between pandas datetime and datetime datetime

Hi have some dates in datetime.datetime format that I use to filter a panda dataframe with panda timestamp. I just tried the following and get a 2 hour offset : from datetime import datetime import pandas as pd pd.to_datetime(datetime(2020, 5, 11,…
Mr. O
  • 43
  • 1
  • 3
4
votes
3 answers

datetime.fromtimestamp() - returns my local timezone instead of GMT

I have a problem converting timestamp to GMT. As far as I know, the timestamp is allways in GMT time so I expect datetime.fromtimestamp returning GMT or timezone-aware datetime but it returns my local (Bratislava/Prague) datetime. import…
Milano
  • 18,048
  • 37
  • 153
  • 353