ThreeTen / threeten

This project was the home of code used to develop a modern date and time library for JDK8. Development has moved to OpenJDK and a separate backport project, threetenbp.
http://threeten.github.io/
191 stars 37 forks source link

Add DTFormater.withZoneSystemDefault() #275

Closed jodastephen closed 11 years ago

jodastephen commented 11 years ago

User issue #271 proposed an easier way to use the system default time-zone in formatting/parsing. While I don't think that adding "system default" methods all over the code base is helpful, adding one in the formatter makes sense.

 // current
 formatter.withZone(ZoneId.systemDefault());
 // proposed
 formatter.withZoneSystemDefault();

While not a huge saving in characters, it will be easier for users to find through IDEs and Google searches.

Implementation is of course simple.

jodastephen commented 11 years ago

Won't fix, as the current way is simple enough, and promoting the system time-zone is a bad idea in general.