jdtounix

(PHP 4, PHP 5, PHP 7)

jdtounixConvert Julian Day to Unix timestamp

Description

jdtounix ( int $julian_day ) : int

This function will return a Unix timestamp corresponding to the Julian Day given in julian_day. The time returned is UTC.

Parameters

julian_day

A julian day number between 2440588 and 106751993607888 on 64bit systems, or between 2440588 and 2465443 on 32bit systems.

Return Values

The unix timestamp for the start (midnight, not noon) of the given Julian day

Errors/Exceptions

If julian_day is outside of the allowed range, a ValueError is thrown.

Changelog

Version Description
8.0.0 This function no longer returns false on failure, but raises a ValueError instead.
7.3.24, 7.4.12 The upper limit of julian_day has been extended. Previously, it was 2465342 regardless of the architecture.

See Also

  • unixtojd() - Convert Unix timestamp to Julian Day

© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/function.jdtounix.php