フローアクションスクリプトと出力変数の GlideDateTime の理解Issue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } フローアクションでは、GlideDateTime オブジェクトがローカル変数に格納され、文字列タイプまたは日付/時刻の出力変数として渡されると、フロー実行の詳細ページに UTC 形式 (協定世界時) ではなくユーザーのタイムゾーンの日付/時刻が表示されます。 フローアクションスクリプトセクションの次のコードは、この問題を示しています。 (function execute(inputs, outputs) {// ... code ...var current_datetime = new GlideDateTime();outputs.current_datetime = current_datetime; outputs.current_datetime_in_datetime = current_datetime; gs.log("*** GlideDateTime object *** " + current_datetime);})(inputs, outputs); この例では、current_datetime は String 型の出力変数で、current_datetime_in_datetime は Date/Time 型の出力変数です フローの実行後、日付/時刻の表示が異なります。 システムログ: *** GlideDateTime object *** 2020-01-22 01:53:30 // in UTC フロー実行の詳細ページで、次の操作を行います。 current_datetime 21-01-2020 17:53:30 // in User's timezonecurrent_datetime_in_datetime 21-01-2020 17:53:30 // in User's timezone Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } サポートされているすべてのリリース Cause<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } フロー実行の詳細ページには、GlideDateTime.getDisplayValue() メソッドを使用して日付/時刻が表示されます。このメソッドには、ユーザーのタイムゾーンの日付/時刻が表示されます。 Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } フロー実行の詳細ページに日付/時刻を UTC で表示するには、スクリプトで GlideDateTime.getValue() メソッドを使用します。 スクリプトを次のように変更します。 (function execute(inputs, outputs) {// ...コード。。。var current_datetime = new GlideDateTime();outputs.current_datetime = current_datetime.getValue();outputs.current_datetime_in_datetime = current_datetime.getValue();gs.log("*** GlideDateTime オブジェクト *** " + current_datetime);})(inputs, outputs); フローの実行後、日付/時刻は一貫して表示されます。 システムログで: GlideDateTime オブジェクト *** 2020-01-22 01:53:30 // UTC フロー実行の詳細ページで、次の操作を行います。 current_datetime 2020-01-22 01:53:30 // UTCでcurrent_datetime_in_datetime 2020-01-22 01:53:30 // UTCで Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } GlideDateTime API とメソッドの詳細については、製品ドキュメント「