Anonymous avatar Anonymous committed 2a1dc67 Merge

Merge "Further clarification of System.currentTimeMillis/Date/SimpleDateFormat."

Comments (0)

Files changed (3)

luni/src/main/java/java/lang/System.java

     /**
      * Returns the current time in milliseconds since January 1, 1970 00:00:00.0 UTC.
      *
-     * <p>This method always uses UTC, regardless of the system's time zone.
+     * <p>This method always returns UTC times, regardless of the system's time zone.
      * This is often called "Unix time" or "epoch time".
      * Use a {@link java.text.DateFormat} instance to format this time for display to a human.
      *

luni/src/main/java/java/text/SimpleDateFormat.java

  * reason it is almost always necessary and desirable to include the timezone in the output.
  * It may also be desirable to set the formatter's time zone to UTC (to ease comparison, or to
  * make logs more readable, for example). It is often best to avoid formatting completely when
- * writing dates/times in machine-readable form. Simply sending the "Unix time" as an integer is
- * cheaper and unambiguous, and can be formatted any way the recipient deems appropriate.
+ * writing dates/times in machine-readable form. Simply sending the "Unix time" as a {@code long}
+ * or as the string corresponding to the long is cheaper and unambiguous, and can be formatted any
+ * way the recipient deems appropriate.
  *
  * <h4>Synchronization</h4>
  * {@code SimpleDateFormat} is not thread-safe. Users should create a separate instance for

luni/src/main/java/java/util/Date.java

  * by {@code DateFormat}, and this class' deprecated computational functionality is
  * now provided by {@code Calendar}. Both of these other classes (and their subclasses)
  * allow you to interpret a {@code Date} in a given time zone.
+ *
+ * <p>Note that, surprisingly, instances of this class are mutable.
  */
 public class Date implements Serializable, Cloneable, Comparable<Date> {
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.