Questions tagged [utc]

UTC stands for Coordinated Universal Time - it is the time standard by which the world regulates clocks and time.

UTC stands for Coordinated Universal Time - it is the time standard by which the world regulates clocks and time.

Questions relating to UTC can relate to date-time formatting, conversions etc.

Definition taken from - WikiPedia

2332 questions
0
votes
1 answer

Why isn't my local DateTime being converted to UTC?

I create a local DateTime where the offset should be 00:01:00 (GMT Standard Time). However when converting to UTC it merely specifies the kind as UTC, and doesn't actually convert it. [Test] public void…
numberjak
  • 1,065
  • 4
  • 13
  • 28
0
votes
1 answer

I want to convert UTC date to system date based on the system time zone using Swift. It worked for me earlier

func getDateWithoutTimeForDisplay() -> String { let formatter = DateFormatter() // formatter.locale = Locale(identifier: "en_US") formatter.dateFormat = "yyyy-MM-dd HH:mm:ss" formatter.timeZone = TimeZone(identifier: "UTC") …
0
votes
0 answers

UTC to Central Time conversion

I have a dataset in which the time stamp is UTC. I want to convert it into Central Time (CDT/CST), including the daylight saving time switches(CDT= UTC-5, CST=UTC-6). I cannot use [DateTimetoLocal] function because our Alteryx server runs on GMT. If…
arix
  • 1
0
votes
1 answer

Question about different datetime format, really confusing

This question is probably better to explain with an example date, for instance the datetime now (London time): 21/08/2020 11:34 am I'm confused about the time with 'ET' and also UTC format, and ISO format, is EDT same as ET? Why so many different…
wawawa
  • 2,835
  • 6
  • 44
  • 105
0
votes
1 answer

SQL Server Prevent Update on Column (datetime2 column value set by database on insert)

I have a table Values with 3 columns: CREATE TABLE [dbo].[Values] ( [Id] [uniqueidentifier] NOT NULL, [Value] [nvarchar](150) NOT NULL, [CreatedOnUtc] [datatime2](7) NOT NULL ) I want SQL Server to set the value of CreatedOnUtc to…
Roi Shabtai
  • 2,981
  • 2
  • 31
  • 47
0
votes
2 answers

JAVA : Convert hour into UTC+1 during Winter and UTC+2 during Summer

I'm learning Java and I try to understand how the hour system work. The hour format I use is HH:mm:ss. I want to convert this string into UTC+1 hour during winter and UTC+2 during summer. To know the date, I use the format : yyyy/MM/dd. Below, an…
0
votes
2 answers

How to Convert GMT time to Local time

I'm new to python and I need to convert the air_time variable to local machine time or the current_time variable to GMT and then subtract one from other in this script but don't know how to do it. from datetime import datetime air_time_GMT =…
Rezwan
  • 17
  • 1
  • 9
0
votes
0 answers

Read modify and write dates with node.js

My goal is open a text.txt with 3 different dates and times in UTC 2020-07-31T21:43:00.000Z 2020-07-30T21:43:00.000Z 2020-07-28T21:43:00.000Z modify those dates in EST time and write on a text2.txt file I know how to open text.txt and write the…
0
votes
1 answer

How to convert UTC time string to Local Time format?

I get response from an News API detailing the time an article was published as a UTC string ex below: "2020-07-17T19:30:40Z" The goal is to have the articles say when they were published in hours ago for example, a news article could say that it was…
JavaHava
  • 189
  • 2
  • 15
0
votes
4 answers

Is the UTC() call redundant in rand.Seed(time.Now().UTC().UnixNano())?

Many examples on the Internet use rand.Seed(time.Now().UTC().UnixNano()) to initialise the pseudo random number generator seed. I see that if I omit the UTC() call, it still works fine. Unix (or UnixNano) time is anyway the number of seconds (or…
Lone Learner
  • 18,088
  • 20
  • 102
  • 200
0
votes
1 answer

pass UTC dates in query via Dapper

I'm posting an answer here for myself (if no one else) since I never found it laid out obviously elsewhere in SO. Lost several hours on this. I wanted to make use of Dapper in the following manner: await dapper.Connection().QueryAsync(insertSQL,…
Wellspring
  • 1,128
  • 1
  • 10
  • 19
0
votes
1 answer

ISO Date format shows RangeError

I have to convert a date format to iso format. It works fine but until the date 30. If i use 31/08/2019 it shows range error: Invalid time value at Date.toISOString. Using date picker for this. This error shown for 31 of every month. function…
0
votes
0 answers

Woocommerce orders datetime wrong

I fix datetime zone in functions.php of my child-theme to date_default_timezone_set('Asia/Bangkok'); But It seems like the date of Woocommerce orders, even i go on an order to edit, the datetime displaying wrong. How to fix all datetime of my…
csu
  • 385
  • 1
  • 7
  • 20
0
votes
0 answers

How get datetime from a property, changing default dateType in getter method?

Actually my sqldatabase with Entity Framework save DateTime how date type local, but i need in the class model get that value ever like date type UTC. Exists one way from modify the getter method or a datanotation for change value type when i get it…
Dr oscar
  • 359
  • 1
  • 4
  • 16
0
votes
1 answer

Does having ZoneId and ZoneOffset at the same time make sense?

I'm a little bit confused of possibility in Java to have ZoneId and ZoneOffset in date at the same time For example, does the date 2020-01-01'T'00:00:00+01:00[UTC-8] make sense? What time is it in UTC? Is it +01:00 offset from UTC-8 timezone, so…
CameronCoob
  • 81
  • 1
  • 11
1 2 3
99
100