![]() A better practice is to use an explicit DateTimeZone instance. ( "laterAsText: " + laterAsText ) īeware that this syntax uses default time zone. String laterAsText = formatter.print( later ) This source code may be used freely forever by anyone taking full responsibility for doing so.ĭateTime later = DateTime.now().plusHours( 8 ) ĭateTimeFormatter formatter = DateTimeFormat.forPattern( "dd/MM/yyyy HH:mm:ss" ) Joda-Time makes this kind of work much easier. Update: The Joda-Time project is now in maintenance mode, with the team advising migration to the java.time classes. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |