Questions tagged [datetime-conversion]

Use this tag for questions related to the Datetime conversion, i.e. manipulating the Datetime in such a way, that a new, different in format, Datetime is produced.

is used in its general meaning, and is usually used for questions related on how to convert a Datetime object in another, new and with a different format, Datetime object, usually for making two different programming platforms communicate.

For example, your application may produce Datetimes of a specific format, but your Database to accept another Datetime format, different from the one your application is using. In that case, a conversion form the application's format to the Database's format is needed.

316 questions
0
votes
1 answer

Java UTC String to Paris Time

From this time : String date = "2023-01-31T23:00:00.000Z"; Which is in zulu time (UTC). How can I get the LocalDateTime in Paris time ? which can be UTC+1 or UTC+2 depending on the offeset if it's Summer or Winter. I tried that but it doses not…
AyoubMK
  • 526
  • 1
  • 4
  • 19
0
votes
2 answers

How to massconvert filenames from PREFIX_00000000.png to PREFIX_HH:mm:ss.ffff.png

I've a huge number of png files, which are named the following way: PREFIX_00000000.png. These files come from extracting frames from video files using ffmpeg -skip_frame nokey -i ORIGINALVIDEO.MP4 -vsync vfr -frame_pts true -r 1000 FRAMES_%d.png…
Jafix
  • 37
  • 8
0
votes
3 answers

Java ZonedDateTime MST to UTC conversion uses daylight savings

I need to convert the timestamp to UTC. Timestamp has the MST timezone, which is specified in the timestamp Examples of observed conversions: 2023-03-20 08:53:19 MST -> 2023-03-20T14:53:19 (-6) 2023-01-20 08:53:19 MST -> 2023-01-20T15:53:19 …
0
votes
1 answer

Is StrToDateTime broken in Delphi 11?

In Delphi 10.4 and older we could call StrToDateTime with custom format settings and the String would get parsed. In 11.3 this is not the case anymore. I get the following exception: Project X.exe raised exception class EConvertError with message…
kkrajnc
  • 3
  • 1
0
votes
0 answers

Python Pandas datetime to Unix timestamp multiple different results

I found a few approaches how to convert the Pandas datetime to Unix timestamp, however the results are not the same. What am I doing wrong, why the res1 = res2 = res3 != res4? (there is 3,600 second difference). Thank you! res1 =…
0
votes
0 answers

How to keep datetime sent from client unchanged in ASP.NET Core Web API

I am calling an API controller post method from client with a model that contains datetime properties, but when the request is received at the API controller, the datetime value automatically get changed. My client application is a desktop…
Neeraj Kumar Gupta
  • 2,157
  • 7
  • 30
  • 58
0
votes
2 answers

Unwanted timezone conversion for an incoming timestamp in spring boot app

I'm trying to format the incoming timestamp in my spring boot app, but the code that I wrote is changing the timezone of the incoming timestamp. It is adding 5:30 hrs on its own which I don't want. Here is my snippet: String startTime =…
Divya Singh
  • 147
  • 1
  • 13
0
votes
0 answers

In SSRS ,How to convert UTC time (Server time) to Client using local system time ? Any expression available for this conversion?

=System.TimeZone.CurrentTimeZone.ToLocalTime(Globals!ExecutionTime) The above expression does nothing for me. It displays same server time itself. Any other new expressions available for SSRS report? I want to display local system time on reports…
0
votes
1 answer

Problem with matplotlib date formatting and conversion from epoch time: OverlowError: int too big to convert

The time on the x-axis of my plot is in seconds since the epoch, and I want to convert them to "Year-Month-Day Hour:Minute" format. I follow the documentation here, and I get this traceback: Traceback (most recent call last): File…
Andreas Schuldei
  • 343
  • 1
  • 15
0
votes
1 answer

Astropy time conversion very slow

I have a script that reads some data from a binary stream of "packets" containing "parameters". The parameters read are stored in a dictionary for each packet, which is appended to an array representing the packet stream. At the end this array of…
Guiux
  • 79
  • 1
  • 10
0
votes
0 answers

How to converter a TIMESTAMP_MICROS_STRINGIFIER Parquet using Java

I would like to converter a Parquet TIMESTAMP_MICROS_STRINGIFIER in Java date format. My code below return a wrong date: private static void writeGroup(BufferedWriter w, Group g, MessageType schema, String csvDelimiter) throws IOException…
user3582583
  • 57
  • 1
  • 1
  • 6
0
votes
1 answer

How to identify timezone by string time and convert multiple timezones to one timezone in kotlin

I have list of records with dateTime in different timezones [ { "id": 1, "dateTime": "2023-01-01T14:10:24.478Z" }, { "id": 2, "dateTime": "2023-01-22T08:39:48.374+08:00" }. { "id": 3, …
AndroidDev
  • 35
  • 5
0
votes
1 answer

How to convert the date format "/Date(253402214400000+0000)/" into yyyyMMdd:hhmmss in Java?

Today we have the date/time in epoch format "/Date(16747622680000)/" which can be easy converted into yyyyMMdd:hhmmss when getting the digits as milliseconds from the String and pass it to an instance of java.util.Date today = new…
0
votes
2 answers

Converting a date from local timezone to UTC

I have a Laravel-based app that is used by people from various parts of the US. I am capturing a timestamp in Javascript when the user takes a specific action, and then I am submitting that timestamp as form data, for the Laravel/PHP to process. The…
John Hubler
  • 877
  • 1
  • 11
  • 27
0
votes
2 answers

Given ISO and timezone strings, how to convert them to UTC string in Java?

For example, I have an ISO string "2022-12-22T18:20:00.000", and a timezone string "US/Eastern". How do I convert them into a UTC time in the same format (iso 8601), using Java?