Skip to content

Commit f92b95f

Browse files
committed
change to use ISO instead of textual dates for localization support in BL
1 parent 284dca1 commit f92b95f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

models/jwt/JwtService.cfc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ component accessors="true" singleton threadsafe {
163163
/**
164164
* Logout a user and invalidate their access token
165165
*
166-
* @user
166+
* @user
167167
* @customClaims
168168
*/
169169
function logout(){
@@ -652,7 +652,7 @@ component accessors="true" singleton threadsafe {
652652
function toEpoch( required target ){
653653
return dateDiff(
654654
"s",
655-
dateConvert( "utc2local", "January 1 1970 00:00" ),
655+
dateConvert( "utc2local", "1970-01-01T00:00:00Z" ),
656656
arguments.target
657657
);
658658
}
@@ -666,7 +666,7 @@ component accessors="true" singleton threadsafe {
666666
return dateAdd(
667667
"s",
668668
arguments.target, // should be in utc
669-
dateConvert( "utc2local", "January 1 1970 00:00" )
669+
dateConvert( "utc2local", "1970-01-01T00:00:00Z" )
670670
);
671671
}
672672

test-harness/handlers/Public.cfc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ component {
3737
}
3838

3939
function toEpoch( required target ){
40-
return dateDiff( "s", dateConvert( "utc2local", "January 1 1970 00:00" ), arguments.target );
40+
return dateDiff( "s", dateConvert( "utc2local", "1970-01-01T00:00:00Z" ), arguments.target );
4141
}
4242

4343
function fromEpoch( required target ){
44-
return dateAdd( "s", arguments.target, dateConvert( "utc2local", "January 1 1970 00:00" ) );
44+
return dateAdd( "s", arguments.target, dateConvert( "utc2local", "1970-01-01T00:00:00Z" ) );
4545
}
4646

4747
}

0 commit comments

Comments
 (0)