You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/11/04 06:55:00 UTC

[jira] [Updated] (HDDS-7911) Replace Time.now() with Instant.now()

     [ https://issues.apache.org/jira/browse/HDDS-7911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated HDDS-7911:
---------------------------------
    Labels: pull-request-available  (was: )

> Replace Time.now() with Instant.now()
> -------------------------------------
>
>                 Key: HDDS-7911
>                 URL: https://issues.apache.org/jira/browse/HDDS-7911
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: Ozone Manager
>            Reporter: Tsz-wo Sze
>            Assignee: Rishabh Patel
>            Priority: Major
>              Labels: pull-request-available
>
> OM uses Time.now() for creation time and modification time.  Time.now() (org.apache.hadoop.util), which calls System.currentTimeMillis(),
>  - [https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#currentTimeMillis--]
> depends on the local time zone setting. It may cause problems when moving an Ozone image from one machine to another machine with different time zone settings.  Instead, we should use Instant.now()
>  - [https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html#now--]
> which uses UTC time-zone.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org