Can a PST file contain a PST file? - recursion

I'm working with PST files using outlook-redemption and I've got a conceptual question: Can a PST file contain a PST file? i.e. are PST files recursive-enabled?
I know that a PST file can contain an email item with a PST attachment, but is it possible for a PST to simply have a child PST file?
Fingers crossed the answer is no (huge amount of avoided complexity...)
Thanks in advance!

No, it is not possible. An attachment that is a PST file is possible, but that is it.

PST file is a personal storage table and it contains mailbox data such as emails, contacts, journals, tasks, and others. But it cannot contain child PST file.

Related

Moment isAfter day

So I need to check whether the current time is after a EndDate, which is a date stored as 19:00 UTC. I only need to know if it's the next day.
This is what I'm currently doing
const now = moment();
const tooLate = now.isAfter(moment(EndDate), 'day');
I worry about timezones. I supposedly need this for central time. Is this sufficient? Or do I need to worry about the timezone? As I understand it, moment runs in UTC to start with.
Depends on the format of EndDate. By default moment() will parse in local time, so unless EndDate is a JS Date object, a unix timestamp (e.g. 1318781876406), or in string form with UTC offset (e.g. 2013-02-08 09:30:26.123+07:00) then you will have a problem if it is not in the same timezone as the client.
You can use moment.UTC() to parse in UTC time instead of local time. This should be enough to solve the any formatting problems you might have with EndDate

How does this teradata timestamp with timezone example make sense?

In the teradata documentation it says:
"Suppose an installation is in the PST time zone and it is New Years Eve, 1998-12-31 20:30 local time.
The system TIMESTAMP WITH TIME ZONE for the indicated time is ' 1999-01-01 04:30-08:00 ' internally."
This does not mesh with my understanding. I figure it ought to be '1999-01-01 04:30+00:00' internally because it should be stored in UTC.
Or, it can be stored as a the local time with a -8 offset, but this example seems to mix the two. Perhaps I am misunderstanding the text?
Not sure if this is an answer, but it's too long for a comment.
That "internal" storage part is very misleading. We don't care how Teradata stores anything internally.
I find this easier to look at using BTEQ, since SQL Assistant doesn't show timezones, at least by default. So, assuming you've logged into BTEQ...
--set session timezone to pst (GMT - 8)
SET TIME ZONE INTERVAL -'08:00' HOUR TO MINUTE ;
create volatile table vt_foo (
ts_w_zone timestamp(0) with time zone,
ts_wo_zone timestamp) on commit preserve rows;
insert into vt_foo
select
cast('1998-12-31 20:30:00' as timestamp(0)),
cast('1998-12-31 20:30:00' as timestamp);
select * from vt_foo;
Currently the two values (with and without tz) will match.
ts_w_zone ts_wo_zone
------------------------- --------------------------
1998-12-31 20:30:00-08:00 1998-12-31 20:30:00.000000
Now let's change the timezone for your session to something else, and look at what we get.
SET TIME ZONE INTERVAL -'03:00' HOUR TO MINUTE ;
select * from vt_foo;
ts_w_zone ts_wo_zone
------------------------- --------------------------
1998-12-31 20:30:00-08:00 1999-01-01 01:30:00.000000
The timestamp with zone is still the same. Displaying it without timezone is automatically converting it to your session timezone, which in this example is GMT -3.
EDIT:
Technically, Teradata is actually storing the time with timezone as GMT (1999-01-01 04:30:00) with the timezone offset (-8). That's where the documentation gets the  1999-01-01 04:30-08:00 value from). But that is not how it displays it.

Unparseable Date in Grails Domain Class from SQLite Database

I have a sqlite db (it is the spiceworks db) and I am mapping the tables to grails domain classes. There is a table in particular that is in a datetime format (yyyy-MM-dd HH:mm:ss). An example of such a date in the db for anyone who wants to verify would be: 2015-06-26 15:32:39
I created the domain class and mapped my properties to the columns. Let grails generate the views so that they are default. When I try to get to the index page I get:
URI
/spiceworks/weeklyReportItem
Class
java.text.ParseException
Message
Unparseable date: "2015-06-26 15:32:39" does not match (\p{Nd}++)\Q-\E(\p{Nd}++)\Q-\E(\p{Nd}++)\Q \E(\p{Nd}++)\Q:\E(\p{Nd}++)\Q:\E(\p{Nd}++)\Q.\E(\p{Nd}++)
I've used MSSQL datetimes in the past and have never ran into this issue. In the database, the data type for the problematic column is datetime. Anyone know what's going on?
EDIT: I only have Read permissions on the db and the spiceworks source code isn't open source.
If you look at that regular expression, you'll see it's looking for a ISO8601 timestamp formatted like YYYY-MM-DD HH:mm:SS.SSS - in other words, it needs a decimal seconds, and you're just providing whole seconds.
An easy fix would be to update every existing value in the relevant column by appending '.000' to it, and update the insertion routines to do the same.
If you refer to the sqlite date time functions, there's a %f format specifier for strftime() that can be used to produce fractional seconds that might be helpful if you're building the timestamp directly in an insert query.
In the database, the data type for the problematic column is datetime
Sqlite3 doesn't have a datetime type. The timestamps you're storing are strings. More information.

Sqlite convert date to Unix Timestamp

I have Sqlite database with table with date column, This column content a date values like Fri Dec 01 18:54:58 GMT+02:00 2017 and i want to convert this values to Unix timestamp, I try to slove this issue using strftime function i get null value.
Any idea how to solve this issue with Sqlite without a programmer language?
The command has been used is update Table set createDate=strftime('%s',createDate)*1000 where id=1
Sqlite Documentation

LotusNotes DateTime object and TimeZone property

I have a Lotus Domino server sitting in CET/CEDT.
An email on that server has a DeliveredDate, maybe in the same time zone, maybe not, but let's have it set to 2014-03-01 11:01:38 CET.
Second thing I have is some "canonical time zone string" of another timezone, let's say Z=-4$DO=0$...$ZN=Arabian
How can I get - in a LotusScript ServerTask - the DeliveredDate converted to the time zone represented by aforementioned time zone string?
If some LotusScript servertask puts that date into a NotesDateTime object, I can get the properties LSLocalTime, which is CET, LSGMTTime, which is GMT, and ZoneTime, which of course also returns CET. Functions include ConvertToZone, which does not take a string, and the undocumented merge, which changes the time, such that 11:01 CET becomes 11:01 AST (8:01 CET).
But a delivered date of 2014-03-01 11:01 CET should become 2014-03-01 14:01 AST;
and a delivered date of 2014-04-01 11:01 CEDT should become 2014-04-01 13:01 AST.
How?
Notes formula language has a function that does exactly what you want. It's called #TimeToTextInZone. According to this developerWorks thread, there is no equivalent in LotusScript. However, you could try using NotesSession.Evaluate() combined with #TimeToTextInZone.
It looks like that string contains the values for the zone and dst arguments to ConvertToZone, so you can just parse it and use that method, right? Am I missing something?

Resources