Questions tagged [localtime]

Calendar time expressed relative to the user's local timezone.

Calendar time expressed relative to the user's local timezone.

461 questions
1
vote
1 answer

Get local time from UTC datetime in ActionScript 3

Does AS3 have a way of converting a datetime variable into local time?
Francisc
  • 77,430
  • 63
  • 180
  • 276
1
vote
1 answer

Is there a way to set alarm in android with local date and local time?

I am building a Calendar app to save events, show them and edit them with DatabaseHelper. I want to add alarm to these events but every I can find only setting alarm with Calendar import library. I want to set alarm in specific date and specific…
1
vote
1 answer

Why is Java LocalTime 01:32:13.283256 stored as time 00:32:13 in database? 1 hour behind

Why is the value set to 1 hour behind? If Europe/Dublin or Europe/London is same offset as UTC, why is the value in db different to originating JVM value? JVM: Europe/Dublin - TimeZone.getDefault().getID() or JVM: Europe/London -…
bobbyrne01
  • 6,295
  • 19
  • 80
  • 150
1
vote
1 answer

How to get the duration time

I have departure time - 02:00, arrival - 06:15, and on the way - "on the way 4h 15m". I want to calculate whether the travel time is counted correctly HTML
02:00
on the way…
EYE
  • 13
  • 2
1
vote
0 answers

How to change a past date from local Eastern time to Central European Time while accounting for daylight savings?

I am new to C# so please excuse me if the question is too simple, I tried the code below and it didn't work I tried: //-- Local Time I want to convert DateTime eventDate1 = new DateTime(2020, 03, 21, 13, 20, 01, DateTimeKind.Local); //-- Timezone I…
danato61
  • 11
  • 2
1
vote
0 answers

Korrekt way to get the duration between a time strings and current time in Kotlin

what is the correct and easiest way to get the duration between a time string and actual time in Kotlin? I have following time strings (timeStr): "18:00:00" At the end I like to have a string like this: "x hours and y minutes to ..." My current…
mepi0011
  • 25
  • 7
1
vote
2 answers

Why getLocalTime implementation needs delay

I noticed a weird behavior of my application on an ESP32. After some "debugging" I think the issue is due to this function: bool getLocalTime(struct tm * info, uint32_t ms) { uint32_t start = millis(); time_t now; while((millis()-start)…
Mark
  • 4,338
  • 7
  • 58
  • 120
1
vote
1 answer

pandas DataFrame.plot: how do I get UNIX timestamps on the x-axis as date/time in my local timezone?

I'm trying to plot some time series data whose source times are UNIX timestamps (seconds since 1970) and I want to see date/times in my local timezone on the x-axis. I'm using the DataFrame.plot method from pandas. No matter what I do, I seem to get…
1
vote
2 answers

How to get timezone offset for historic daylight saving time local date?

There’s an SQL Server who uses GETDATE() in UTC+1, so it’s prone to different local times. In summer, it yields +02:00 (CEST), while in winter, it’s +01:00 (CET). Getting the timezone offset of the current time is easy. How to get the UTC offset for…
dakab
  • 5,379
  • 9
  • 43
  • 67
1
vote
2 answers

Convert English date in French language

I get a $date from an API in UTC format like 2021-11-13T14:00:14Z. So using php I convert it to : 13 November 2021 $date = strftime(date('d F Y', strtotime($date); So now I want to translate it in French. I am working on local with on macbook pro…
1
vote
2 answers

Cant get right localtime in C

Im trying to get the current localtime in C, lets say Italy, I tried the code below but it returns a time three hours earlier than the real one. For example if executed at 17:34 it will return 14:34, what am I doing wrong? #include…
StefanoN
  • 147
  • 1
  • 7
1
vote
1 answer

@JsonFormat pattern for LocalTime

I have this field @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") private Date completionDate; I get this result: 2021-10-05T14:17:16Z I need to split this date into 2 fields: @JsonFormat(shape =…
Pavel Petrashov
  • 1,073
  • 1
  • 15
  • 34
1
vote
1 answer

Java compare times without dates using LocalTime class

I am taking a CSV file of delivery times (unordered) and I need to sort them by time to use the data. I am storing the necessary info in a LinkedList in my roadDataToBeSorted data structure which consists of 3 strings: rdName, rdZipCode, and…
CoolHands
  • 25
  • 7
1
vote
1 answer

How to convert datestring to local time?

2021-08-04T22:55:12+0000 I want to convert the above string to local time. But fromdateiso8601 does not work on this format. What is the best way to convert this kind of string to local time? EDIT: I tried the following but the part of 23:55:12 does…
user1424739
  • 11,937
  • 17
  • 63
  • 152
1
vote
2 answers

Time in local time using different time zones - Matlab Table

I have a time series data recorded in different time zones (sample figure attached). Please note that the time information is in UTC. I need to convert them to local time (AM/PM) automatically for a large dataset. I have attached sample data and any…
Ganesh
  • 25
  • 6