As the title states, I'm required to find the number of TAI seconds since 00:00:00 UTC, January 1st, 2004 (in Java). I've just recently learned what TAI is and my attempts at working out the above have left me a bit confused.
What I've tried:
I know in Java you can use System.currentTimeMillis()
to get the number of milliseconds since January 1st, 1970 UTC (Javadocs).
Additionally, from my brief research of atomic time I understand that currently TAI is exactly 37 (leap) seconds ahead of UTC.
Therefore, my thought process was to:
- Find the number of seconds between 1970 and 2004 (34 years)
- Subtract that from the current UTC time to get the number of since 2004
- Add 37 to get the actual number of seconds in TAI
I wasn't certain of the math here (1 day = 86400 seconds):
- Option 1: 86400 (seconds) x 365.25 (days (1 Julian Year)) x 34 (years) = 1,072,958,400
- Option 2: 86400 (seconds) x 365 (days (1 Common Year)) x 34 (years) = 1,072,224,000
At this point I started questioning whether the 37 leap seconds added to TAI were to account for leap years when comparing to UTC and thus I should use Option 2. Unfortunately, I'm not certain whether my thought process is correct and I figured it'd be better to ask here to make certain.
Also, I found this cite claiming that 1,072,915,200 (seconds) is equivalent to 01/01/2004 @ 12:00am (UTC). Which kind of threw me off because it's not equal to either of my calculations.