feat: scripts
This commit is contained in:
12
scripts/date.js
Normal file
12
scripts/date.js
Normal file
@@ -0,0 +1,12 @@
|
||||
#! /usr/bin/env runjs
|
||||
|
||||
var TimeZone = java.util.TimeZone;
|
||||
var SimpleDateFormat = java.text.SimpleDateFormat;
|
||||
|
||||
var main = () => {
|
||||
var sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");
|
||||
sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
|
||||
println(sdf.format(new java.util.Date()));
|
||||
};
|
||||
|
||||
main();
|
||||
Reference in New Issue
Block a user