Replies:

You can convert with $SYSTEM.Util.UTCtoLocalWithZTIMEZONE().

https://cedocs.intersystems.com/ens20141/csp/documatic/%25CSP.Documatic.cls?&LIBRARY=%25SYS&CLASSNAME=%25SYSTEM.Util

USER>write $SYSTEM.Util.UTCtoLocalWithZTIMEZONE($ZTIMESTAMP)
66263,48361.382728
USER>write $ZTIMESTAMP
66263,15968.3579578
USER>
 
USER>write $ZDATETIME($SYSTEM.Util.UTCtoLocalWithZTIMEZONE($ZTIMESTAMP),3)
2022-06-03 13:26:26
USER>write $ZDATETIME($ZTIMESTAMP,3)
2022-06-03 04:26:34
USER>

ImportDDL() method in %SYSTEM.SQL.Schema class can run multiple queries.

Documentation is https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=GSQL_import#GSQL_import_cache

Step1: preparing import file like below:

You need to use "go" in end of each query.  (c:\temp\updatequeries.txt)

UPDATE Test2.Person Set Name='abc' where ID=1
go
UPDATE Test2.Person Set Name='efg' where ID=2
go
UPDATE Test2.Person Set Name='hij' where ID=3
go

Step2: running  ImportDDL() method like below:

USER>do $system.SQL.Schema.ImportDDL("c:\temp\updatequeries.txt","c:\temp\import.log","IRIS")
 
 
Importing SQL Statements from file: c:\temp\updatequeries.txt
 
 
Recording any errors to principal device and log file: c:\temp\import.log
 
 
  SQL statement to process (number 1):
     UPDATE Test2.Person Set Name='abc' where ID=1
      Preparing SQL statement...
      Executing SQL statement...
  DONE
 
  SQL statement to process (number 2):
     UPDATE Test2.Person Set Name='efg' where ID=2
      Preparing SQL statement...
      Executing SQL statement...
  DONE
 
  SQL statement to process (number 3):
     UPDATE Test2.Person Set Name='hij' where ID=3
      Preparing SQL statement...
      Executing SQL statement...
  DONE
 
Elapsed time: .01458 seconds
USER>

@Megumi Kakechi 
I can get correct result on 2022.1! laugh

I use iris 2022.1 container. (image lists :https://community.intersystems.com/node/511986)

USER>write $ZV
IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2022.1 (Build 164U) Tue Apr 5 2022 01:30:47 EDT

USER>do $system.Python.Shell()

Python 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0] on linux
Type quit() or Ctrl-D to exit this shell.
>>> sql="select name,value from %Library.Global_get('user','^ISJ',,2,2)"
>>> rset=iris.sql.exec(sql)
>>> dataframe=rset.dataframe()
>>> dataframe
      name                value
0  ^ISJ(1)  $lb("名前","年齢","住所")
1  ^ISJ(2)  $lb("佐藤","50","東京")
2  ^ISJ(3)  $lb("加藤","40","大阪")
3  ^ISJ(4)  $lb("伊藤","30","京都")
Followers:
Mihoko has no followers yet.
Following:
Mihoko has not followed anybody yet.
Global Masters badges: