File tree Expand file tree Collapse file tree
src/main/scala/ru/org/linux/site Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,14 +27,15 @@ object DateFormats:
2727 private val Short = DateTimeFormat .forPattern(" dd.MM.yy HH:mm" ).withLocale(RussianLocale )
2828 private val Time = DateTimeFormat .forPattern(" HH:mm" ).withLocale(RussianLocale )
2929 private val Date = DateTimeFormat .forPattern(" dd.MM.yy" ).withLocale(RussianLocale )
30+ private val Moscow = DateTimeZone .forID(" Europe/Moscow" )
3031
3132 private val Iso8601 : DateTimeFormatter = ISODateTimeFormat .dateTime
3233 private val Rfc822 : DateTimeFormatter = DateTimeFormat .forPattern(" EEE, d MMM yyyy HH:mm:ss Z" ).withLocale(Locale .US )
3334 private val DateLong : DateTimeFormatter = DateTimeFormat .longDate().withLocale(RussianLocale )
3435
3536 def formatDefault (tz : DateTimeZone , date : Date ) = Default .withZone(tz).print(date.getTime)
36- def formatIso8601 (date : Date ): String = Iso8601 .print(date.getTime)
37- def formatRfc822 (date : Date ): String = Rfc822 .print(date.getTime)
37+ def formatIso8601 (date : Date ): String = Iso8601 .withZone( Moscow ). print(date.getTime)
38+ def formatRfc822 (date : Date ): String = Rfc822 .withZone( Moscow ). print(date.getTime)
3839 def formatDateLong (tz : DateTimeZone , date : Date ): String = DateLong .withZone(tz).print(date.getTime)
3940 def formatDateOnly (tz : DateTimeZone , date : Date ) = Date .withZone(tz).print(date.getTime)
4041 private [site] def formatTime (tz : DateTimeZone , date : Date ) = Time .withZone(tz).print(date.getTime)
You can’t perform that action at this time.
0 commit comments