-
-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LDEV-5173 test cases for add support for epoch and epochms for ParseD…
…ateTime (#2454)
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
component extends = "org.lucee.cfml.test.LuceeTestCase" skip="true" { | ||
function run( testResults, testBox ){ | ||
describe( "Test for LDEV-5173", function() { | ||
beforeEach( function(){ | ||
variables.startingTZ=getTimeZone(); | ||
setTimeZone("IST"); | ||
}); | ||
afterEach( function(){ | ||
setTimeZone(variables.startingTZ?:"UTC"); | ||
}); | ||
it( title="parseDateTime with format 'epoch'", body=function( currentSpec ) { | ||
date = DateTimeFormat( datetime="2024/12/11 16:19:54", mask="epoch" ); | ||
expect(toString(parseDateTime(date=date, format="epoch"))).toBe("{ts '2024-12-11 16:19:54'}"); | ||
}); | ||
it( title="parseDateTime with format 'epochms'", body=function( currentSpec ) { | ||
date = DateTimeFormat( datetime="2024/12/11 16:19:54", mask="epochms" ); | ||
expect(toString(parseDateTime(date=date, format="epochms"))).toBe("{ts '2024-12-11 16:19:54'}"); | ||
}); | ||
} ); | ||
} | ||
} |