0

I got current IST time and converted it to ET timezone. Then i calculated milliseconds for both. But both give same value. They should give different millisec values, right? I used following method,

EtTimeZone.toInstant().toEpocMillie();
Lino
  • 19,604
  • 6
  • 47
  • 65
mrig
  • 382
  • 1
  • 4
  • 21
  • 4
    No, milliseconds since epoch is the same in whatever timezone, because epoch is defined as a specific instant in time (1970-01-01 00:00:00.000 UTC, to millisecond precision). In fact, milliseconds since epoch doesn't really have a timezone at all - it's just a number of milliseconds since a specific instant in time. – Andy Turner Jul 10 '20 at 15:03

1 Answers1

2

Epoch time will have same value in multiple timezone's. epoch time is the time in millisec from 1970-01-01 00:00:00.000 UTC . In case of other timezone's starting point is different

In case of IST(UTC+5:30) start point is 1970-01-01 00:05:30.000

Dijesh
  • 334
  • 2
  • 11