diff options
| author | Brendan Jurd <brendan.jurd@geoplex.com.au> | 2022-03-11 11:51:38 +1100 |
|---|---|---|
| committer | Brendan Jurd <brendan.jurd@geoplex.com.au> | 2022-03-11 14:33:34 +1100 |
| commit | 57b7891e75cc5b069954e4545a71c7f78697852e (patch) | |
| tree | 46e534a3b7ffab9f878289a327fae77d01eca812 /docs/source/operations | |
| parent | 6d00538de1a1d7da04619fdebfcbd5a16ba07a9f (diff) | |
| download | PROJ-57b7891e75cc5b069954e4545a71c7f78697852e.tar.gz PROJ-57b7891e75cc5b069954e4545a71c7f78697852e.zip | |
unitconvert: round to nearest date when converting to yyyymmdd.
This resolves an issue where converting from a low-precision decimalyear
to yyyymmdd gave the wrong result, due to mjd_to_yyyymmdd() truncating
away the fractional time component.
This commit changes the behaviour of mjd_to_yyyymmdd() to round to the
nearest date, instead of truncating.
Refs #1483
Diffstat (limited to 'docs/source/operations')
| -rw-r--r-- | docs/source/operations/conversions/unitconvert.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/source/operations/conversions/unitconvert.rst b/docs/source/operations/conversions/unitconvert.rst index f1488d9a..13ca9228 100644 --- a/docs/source/operations/conversions/unitconvert.rst +++ b/docs/source/operations/conversions/unitconvert.rst @@ -158,6 +158,16 @@ Time units In the table below all time units supported by PROJ are listed. + .. note:: + + When converting time units from a date-only format (`yyyymmdd`), PROJ + assumes a time value of 00:00 midnight. When converting time units + to a date-only format, PROJ rounds to the *nearest* date at 00:00 + midnight. That is, any time values less than 12:00 noon will round to + 00:00 on the same day. Time values greater than or equal to 12:00 noon + will round to 00:00 on the following day. + + +--------------+-----------------------------+ | Label | Name | +==============+=============================+ |
