Created
August 28, 2019 06:09
-
-
Save Likk/ee121a8b6001059ec0502696b38293b6 to your computer and use it in GitHub Desktop.
ColdFusion で日付処理
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
<cfset localDate = now()> | |
<cfset utcDate = DateConvert("Local2utc", localDate)> | |
<cfset epoch = DateDiff("s", "January 1 1970 00:00", utcDate)> | |
<cfset utime = 1371729285> | |
<cfoutput> | |
Local Date: #localDate# <br> | |
UTC Date: #utcDate# <br> | |
Epoch: #epoch# <br> | |
Time :#DateAdd("s", utime ,DateConvert("utc2Local", "January 1 1970 00:00"))# <br> | |
yymmdd24hmiss: #DateFormat(localDate, "yyyy/MM/dd")# #TimeFormat(localDate, "HH:mm:ss")# | |
</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment