Questions tagged [epoch]

Unix time, or POSIX time, is a system for describing points in time, defined as the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds. This tag is *not* for epochs as used in neural networks/machine learning.

Unix time, or POSIX time, is a system for describing points in time, defined as the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds.

It is used widely, not only in Unix-like operating systems, but also in many other computing systems and file formats.

It is neither a linear representation of time nor a true representation of UTC (though it is frequently mistaken for both), as it cannot unambiguously represent UTC leap seconds (e.g. December 31, 1998 23:59:60), although otherwise the times it represents are UTC.

Unix time may be checked on some Unix systems by typing date +%s on the command line.

1440 questions
-2
votes
1 answer

Convert ISO 8601 timestamp string to epoch seconds in Java

I am receiving a string in ISO 8601 date-time format 2020-11-03T15:23:24.388Z. What is the best way to convert this into epoch seconds in Java?
Hoya Coder
  • 41
  • 5
-2
votes
1 answer

How to convert only time like " HH:MM:SS " into epoch in javascript?

Wanna add dstOffset = "01:00:00" into the original time value 2020-05-16T21:17:34+00:00. Orginal time value is converted into EPOCH and it is now 1589663854. I need to convert that dstOffset in EPOCH like in number '1589663854'etc and add it in…
Abdul Moeez
  • 1,331
  • 2
  • 13
  • 31
-2
votes
1 answer

Regex for epoch time in millisecond using java

I have this string: String str = "8240d66c-4771-4fae-9631-8a420f9099ca,458,cross_vendor_certificate_will_expire,1565102543758"; I would like to remove the epoch time from the string using regex I've searched the web but I didn't find a suitable…
tupac shakur
  • 658
  • 1
  • 12
  • 29
-2
votes
1 answer

Java Date to Epoch, limited by Api 21 (Android) with Java7

I've seen many useful responses on this, but using classes unavailable to me. I have a correct Date object, and i've tryied different things, but when a review the result here I can see, it's not working. I can only use Java7 (or kotlin…
LearningCharlito
  • 327
  • 1
  • 2
  • 20
-2
votes
1 answer

Delphi: UnixTime string to DateTime gives unexpected result

I am trying to convert a unixtime string to datetime but it give's a wrong result. I am using Delphi XE2 and uses UnixToDateTime function of Dateutils to convert the unixtime string but no luck. I also used a different function I found in the web…
-2
votes
1 answer

Wrong Date Format shown in device from JSON API

I was showing my JSON date in activity layout but it gives me this kind of date format "1547458358000". How to change the date format into YYYY-MM-dd k:mm:s? The appAdded is date came from JSON API. From the result of testing. The toast message I…
No Name
  • 472
  • 1
  • 6
  • 19
-2
votes
1 answer

Change to hardcoded epoch time in variable?

I have a variable called $end_date which gives me the date in epoch format like this: 1539129600. This translates to Wednesday 10 October 2018 00:00:00. The variable returns different dates, but the time is always the same 00:00:00. Is it possible…
joq3
  • 145
  • 7
-2
votes
2 answers

Convert string epoch to string timestamp in Scala

I have a column ORDER_DATE with epoch timestamp in string. How can I convert this column with string like str = "1536309236032" which is time in epoch to a string with format: 2018-09-07T14:03:56.032Z in Scala? Currently I am…
-2
votes
3 answers

How can I convert epoch datetime in python?

I'm calling an api and getting the datetime field in this format /Date(1500462505221)/ . My motive is to convert it to this format "2018-05-11 23:25:47" . How do I accomplish this ?
Nilesh Kumar Guria
  • 149
  • 2
  • 2
  • 8
-2
votes
1 answer

Subtracting the UNIX Epoch time from the current time in Python

I have a list of UNIX epoch times (Python), something like this: [1526496663206, 1526507363973, 1526507363973, 1526574425012] I want to subtract them from the current time and get the left time, for example, suppose 1526496663206 represents…
crazyy_photonn
  • 161
  • 3
  • 17
-2
votes
1 answer

Why is converting this datetime to Epoch off by 30 minutes?

I have the following string representing a UTC timestamp: 2017-12-03T20:38:00.971261Z I would like to convert it into Posix timestamp (IE: seconds since the epoch) Using this online converter (https://www.epochconverter.com/) I know the answer is…
Saqib Ali
  • 11,931
  • 41
  • 133
  • 272
-2
votes
1 answer

PHP timestamp an hour slow

I am working on an ancient system written in vanilla PHP. I am having some time conversion issues. In the below example, I an expecting both the timestamp and the "pretty date" to reflect one another:
James
  • 1,138
  • 9
  • 13
-2
votes
1 answer

Standard C - How to use a unix epoch timestamp other than Jan 1, 1970?

Timestamp is defined as the number of seconds elapsed since midnight of January 1, 2000, UTC. Using standard C only, how to get unix timestamp with epoch of Jan 1, 2000 UTC and not Jan 1, 1970? time(NULL) returns seconds since January 1,…
Syler
  • 1,151
  • 1
  • 13
  • 30
-2
votes
1 answer

Convert LocalTime for given zone to unix epoch seconds without the date component in java

We received time as hour =11, minutes=29,seconds=54,milliseonds=999 along with timezone information. How to convert this time to unix epoch milliseconds with no date part. I have tried this code : ZoneId zoneId = ZoneId.of("America/New_York"); …
RGoyal
  • 165
  • 3
  • 16
-2
votes
4 answers

String date into Epoch time

I am little bit confused in dates. I am currently working on the weather app and everything works fine .. I just wanna handle this type of format into my own desirable format. 2017-09-10T18:35:00+05:00 I just wanna convert this date into Epoch Time…