Skip to content

Commit

Permalink
LDEV-5173 test cases for add support for epoch and epochms for ParseD…
Browse files Browse the repository at this point in the history
…ateTime (#2454)
  • Loading branch information
cfmitrah authored Dec 13, 2024
1 parent 3417531 commit 67d50d1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/tickets/LDEV5173.cfc
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'}");
});
} );
}
}

0 comments on commit 67d50d1

Please sign in to comment.