How to convert Gregorian date (in seconds) to unix timestamp in PHP
Asked Answered
C

1

6

I have a webservice returning timestamps in Gregorian seconds.

How do I convert Gregorian date (in seconds) to unix timestamp in PHP?

Coycoyle answered 8/8, 2013 at 1:41 Comment(0)
C
10

subtract unix epoch(62167219200) from the Gregorian seconds returned by the web service. see here

Carolecarolee answered 8/8, 2013 at 1:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.