File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/main/scala/sbtbuildinfo Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -159,8 +159,8 @@ buildInfoOptions += BuildInfoOption.BuildTime
159
159
to add timestamp values:
160
160
161
161
``` scala
162
- /** The value is "2015-07-30 03:30:16.849". */
163
- val builtAtString : String = " 2015-07-30 03:30:16.849"
162
+ /** The value is "2015-07-30 03:30:16.849-0700 ". */
163
+ val builtAtString : String = " 2015-07-30 03:30:16.849-0700 "
164
164
/** The value is 1438227016849L. */
165
165
val builtAtMillis : Long = 1438227016849L
166
166
```
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ object BuildInfo {
13
13
private def extraKeys (options : Seq [BuildInfoOption ]): Seq [BuildInfoKey ] =
14
14
if (options contains BuildInfoOption .BuildTime ) {
15
15
val now = System .currentTimeMillis()
16
- val dtf = new java.text. SimpleDateFormat ( " yyyy-MM-dd HH:mm:ss.SSS " )
17
- dtf.setTimeZone( java.util. TimeZone .getTimeZone( " UTC " ) )
16
+ // Output the build time with the local timezone suffix
17
+ val dtf = new java.text. SimpleDateFormat ( " yyyy-MM-dd HH:mm:ss.SSSZ " )
18
18
val nowStr = dtf.format(new java.util.Date (now))
19
19
Seq [BuildInfoKey ](
20
20
" builtAtString" -> nowStr,
You can’t perform that action at this time.
0 commit comments