How do you get a $ZTIMESTAMP in local time?.
I have found this solution and it works:
Set LocalTimestamp=$ZDATETIMEH($ZTIMESTAMP,-3)
Do you use any better way?
InterSystems ObjectScript is a scripting language to operate with data using any data model of InterSystems Data Platform (Objects, Relational, Key-Value, Document, Globals) and to develop business logic for serverside applications on InterSystems Data Platform.
How do you get a $ZTIMESTAMP in local time?.
I have found this solution and it works:
Set LocalTimestamp=$ZDATETIMEH($ZTIMESTAMP,-3)
Do you use any better way?
InterSystems is pleased to announce version 2.0.0 of the Language Server for VS Code. The Language Server augments the VS Code ObjectScript extension to provide better syntax coloring, embedded documentation, code completion and more. Detailed information is available in the GitHub repo's README. Version 2.0.0 adds support for a number of new platform architectures including M1 Macs! It also reduces package size, improves SQL coloring, and fixes a number of other issues detailed in the CHANGELOG.
Hi, I’m using $ZDATETIME to return the following
I would like to return just the YYYYMMDDHHMM i.e. stripping out the seconds.
Does $ZDATETIME have an option for this?
I'm pleased to announce the release of version 1.4.4 of the VS Code extension, which contains the following enhancements and bug fixes. Links will take you to the GitHub issue being addressed. As always, if you already have the extension installed, VS Code should automatically update your extension. If you're a new user, use these instructions to get started.
objectscript.explorer.This example demonstrates the difference you may experience when you write to
Gllobals directly from Embedded Python compared to native ObjectScript.
To make this demo useful I start 2 background jobs that simply write sequentially
to a dedicated global. A common control method signals for a synchronous start.
Similar a common stop & view interrupts data feeding.
That's the principle process:
As 2 jobs run in parallel the probability of just using sequential blocks is reduced.
During the development of this demo, I detected that the JOB command has problems
with ClassMethods in Embedded Python.
It sounds strange though it's embarrassing.
I have a class with ClassMethods written in ISOS and Embedded Python.
The ClassMethods written in ISOS start in the Background as usual. No problems
But my
ClassMethod setPy() [ Language = python ]
{
import iris, datetime, time
- - -Just fails the JOB command with (even 15 sec) timeout and $ZC=0
This is not funny
My actual workaround:
I created a ClassMethod in ISOS, that does an elegant JobStart
and this ClassMethod only runs the Embedded Python ClassMethod.
I started to get the following error when trying to save HTML and js files after editing in VSCode. This used to work fine, csp still works too.
ERROR #16006: Document 'xxx.html' name is invalid
Is there now a setting that I am missing? I did check but saw nothing that was obviously wrong.
I want to be able to view generated items from visual studio code. In Studio there was an option in the open dialog:
.png)
Specifically, I added a namespace to my workspace for editing (Using InterSystems Server Manager) and I want to be able to access the generated items in this namespace.
Time travel is like visiting Paris. You can't just read the guide, you have to throw yourself into it. Eat the food, use the wrong verbs, get double the charges, and end up kissing complete strangers.
The Doctor
We are now going to travel through time, that is, we are going to see future and past dates and how to calculate them in different formats. The TARDIS doesn't wait, take the controls and hold on tight.

I'm thinking to try ChunkedWriter based on the documentation I'm reading to solve an issue but could use some clarification. Anyone that could provide a usage example of this down below?
To send a chunked request, do the following:
I have a SQL query that I want to run against MS SQL from cache ensemble using the SQL outbound adapter. If I run this query direct from MS SQL Studio it take about 7 seconds MAX and returns about half a million rows. The row only contains one column it is a number all same size and if I run this query in the production in ensemble it takes for ever the production finishes without getting the response back. The same query run in cache outside the ensemble environment writing results to a file it returns results taking about 3minutes to complete.
Hello all,
Is using ASP.Net Core 2.0 with Cache Object Script possible? I have it successfully working with .Net 4.5 using the supplied .Net 4.5 Dll file by Intersystems. Is there an updated Dll file for .Net Core 2.0?
Thanks
Hi all,
I am trying to use a %Status property on some of my Response classes. If the execution of a service goes wrong, I set the %Status property on Response with the value $$$ERROR($$$GeneralError, "pre-defined error message").
When I check the visual trace for this message and look for the %Status (property "status_code" on the image), it is displayed like this:
.png)
If I select to display the Body of the Response, I get the 'readable' form of %Status:
.png)
According to the documentation, this is expected as %Status properties are encoded in base64 during Projection to XML.
Hello fellows, I need you wisdom.
In my organization we code in ObjectScript and .int everyday. When I joined nobody knew barely nothing about classes and their use was almost only for storage definition purpose. During my self-learning in caché I discovered the object oriented programming and class developing was possible in caché and started to code in .cls . Being something self-taught, I may have some basic doubts I'd have missed in my documentation readings.
Hi
I'm using %XML.Writer to write XML files from a database source, and I see that it is not encoding carriage return or line feed as 
 and 
 respectively, and is instead leaving them unencode.
What can I do to have them encoded?
Andy
Is there a straightforward workflow in VS Code for moving a class from one namespace to another on the same server? With Caché/IRIS Studio, it was a (sort of) simple export/change namespace in file menu/import operation. But in VS Code it's not obvious (to me, at least).
I can add multiple namespaces to a workspace, but when using isfs:// paths I see only a "Download" option and no "Upload" or "Import/Compile." When I'm navigating the local file tree, I see Import options, but no way to select the namespace into which I want to import.
I will give you some additional information on my first embedded Python package.
it is written as a mix of python and ObjectScript to take the best of both worlds.
Hey Developers,
New video is already on InterSystems Developers YouTube channel:
Hi Folks,
I created a persistent class as below
Class myclass.DataBase Extends %Persistent
{
Property ID As %String;
Property Skill As list Of myclass.SerialTablelist;
}and Created another Serial class as
Class myclass.SerialTablelist Extends %SerialObject
{
Property PSkill As %String;
Property OSkill As %String;
}Now I will save the id as below
do rs.Prepare("Insert into myclass.DataBase(ID)VALUES(?)")
do rs.Execute(ID)I am facing issue with the AS LIST OF
Could any one guide me how to save the Skill (PSkill ,OSkill ) using resultset (I am able to )
Hi all - we just released the first episode of Season 2 for our Data Points podcast by Learning Services. This episode features a conversation with @Bob Kuszewski about Embedded Python. If you're a Python developer, or if you're simply interested in the functionality, check it out! For more information, head over to https://datapoints.intersystems.com.
I'm trying to write a method that runs an OS command with $zf(-100,"/ASYNC") and then waits for it to finish before returning, but I can't figure out how to check if the child process (in $zchild) is still running. $System.Process.State($zchild) always returns "RUN" even once the child process is gone. Is there some better way to check this, short of running another OS-specific command and processing the output (which is just really annoying and unelegant)?
Hi, I am trying to work with visual studio with the extensions offered by InterSystems, but I can't find any option to work locally, is there any way to do it?
Hi,
I am using VSCode together with IRIS 2021.1.
When using Shift+Alt+F to reformat a class file, it pops up with the below message. When I select install formatter, it routes me to the extensions page, where it shows the extensions as being installed. Any advice will be appreciated.
Currently running Ensemble on Red Hat Enterprise Linux Server release 7.7
One of our clients is requesting files sent to their SFTP site be encrypted with their PGP public key and digitally signed with our PGP private key
We have created a custom class that includes the following command to encrypt the files
if (pAction = "Encrypt") {
// Find the Key ID from the Keyname
set tKeyId = ..GPGKeyLookup(pKeyName, ..#PUBLICKEYLUT)
set tCmdLine = "gpg --homedir "_pGPGhomedir_" --always-trust -r """_tKeyId_""" -o "_pOutFileName_" -e "_pInFileName
}
// Execute the command to generate the output file
For some years I missed being able to offer, to everybody interested in ObjectScript, a tutorial more or less complete, to start with ObjectScript. Something that could help more and make things easier to those new developers that come to our technology... something intermediate, halfway between the common "Hello World!", that doesn't really get you further, and the "Advanced Training", that is unaffordable because of lack of time,etc.
If there were something truly helpful not only as an introduction to the ecosystem, but as a starting point, as a boost, to really start to walk into ObjectScript and move forward by yourself... wouldn't that be awesome?
If you develop in IRIS you are confronted with two major phenomena:
Is there some generic way to output a %SQL.StatementResult to CSV?
Hi Developers
As you know it's very easy to publish a package to the Developers Community registry.
But how to test it before publishing? How to be sure that everything you introduced into module.xml is installed properly?
See the step-by-step instruction below!
Hey Developers,
Ready to participate in our annual December competition?
Join the Advent of Code 2021 with InterSystems and participate in our ObjectScript contest to win some $$$ prizes!

So I've been reviewing a lot of questions posted in the InterSystems community regarding NULL properties in JSON. I've also been reviewing the JSON documentation. None of these things have been able to help me so far.
1. We don't seem to have the %JSON.Adaptor class available for us to use in our system.
2. I'm not really confident enough to create JSON Type classes or backporting code, etc.
I created a dummy class and I need my JSON to look like this:
{
"notanumber":"28001",
"aboolean":true,
"anumber":12345,
"adecimal":1.