File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
src/main/resources/static/js Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -257,9 +257,20 @@ jQuery(document).ready(function () {
257
257
} ;
258
258
259
259
self . getUTCDate = function ( epochtime ) {
260
- var d = new Date ( 0 ) ; // The 0 there is the key, which sets the date to the epoch
261
- d . setUTCMilliseconds ( epochtime ) ;
262
- return d ; // Is now a date (in client time zone)
260
+ var date = new Date ( epochtime ) ;
261
+ var resolvedOptions = Intl . DateTimeFormat ( ) . resolvedOptions ( ) ;
262
+ var options = {
263
+ year : 'numeric' ,
264
+ month : 'short' ,
265
+ day : 'numeric' ,
266
+ hour : 'numeric' ,
267
+ minute : 'numeric' ,
268
+ second : 'numeric' ,
269
+ hour12 : false ,
270
+ timeZone : resolvedOptions . timeZone ,
271
+ timeZoneName : 'short'
272
+ } ;
273
+ return date . toLocaleDateString ( resolvedOptions . locale , options ) ; // Is now a date (in client time zone)
263
274
}
264
275
265
276
self . add_requirement = function ( data , event ) {
You can’t perform that action at this time.
0 commit comments