-
Notifications
You must be signed in to change notification settings - Fork 82
Tz reporter #640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Tz reporter #640
Conversation
code/processes/reporter.q
Outdated
| startts:?[not null tab[`timezone];ltime[.tz.ttz[`GMT;tab[`timezone];startts]];startts]; | ||
| endts:?[not null tab[`timezone];ltime[.tz.ttz[`GMT;tab[`timezone];endts]];endts]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do definitely we want to use ltime here? I think that will depend on whether the process is running with -localtime flag set to true or false?
…to accept new timestamp parameters
code/processes/reporter.q
Outdated
| startts:?[not null tab[`timezone];.tz.ttz[`GMT;tab[`timezone];gtime[startts]];startts]; | ||
| endts:?[not null tab[`timezone];.tz.ttz[`GMT;tab[`timezone];gtime[endts]];endts]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the user has set -localtime 0 (or not set it, which defaults to 0 I think), I think this will be wrong? gtime will convert the timestamp to GMT by applying the offset from local time, but if -localtime 0, the time is already GMT, so we don't want to do any conversion?
I think there'll need to be some sort of conditional here based on the -localtime setting?
code/processes/reporter.q
Outdated
| startts:?[not null tab[`timezone];.tz.ttz[`GMT;tab[`timezone];?[`localtime in .proc.params;gtime[startts];startts]];startts]; | ||
| endts:?[not null tab[`timezone];.tz.ttz[`GMT;tab[`timezone];?[`localtime in .proc.params;gtime[endts];endts]];endts]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can just check .proc.localtime here, and probably use $ instead of ?
| startts:?[not null tab[`timezone];.tz.ttz[`GMT;tab[`timezone];?[`localtime in .proc.params;gtime[startts];startts]];startts]; | |
| endts:?[not null tab[`timezone];.tz.ttz[`GMT;tab[`timezone];?[`localtime in .proc.params;gtime[endts];endts]];endts]; | |
| startts:?[not null tab[`timezone];.tz.ttz[`GMT;tab[`timezone];$[.proc.localtime;gtime[startts];startts]];startts]; | |
| endts:?[not null tab[`timezone];.tz.ttz[`GMT;tab[`timezone];$[.proc.localtime;gtime[endts];endts]];endts]; |
Co-authored-by: Jonathon McMurray <jonathon.mcmurray@aquaq.co.uk>
jonathonmcmurray
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good - do you have a set of test cases to validate these changes? I think we need to verify the following scenarios:
- timezone specified for report (timezone different to local timezone),
-localtimeset - timezone specified for report (timezone different to local timezone),
-localtimenot set - timezone specified for report (timezone same as local timezone),
-localtimeset - timezone specified for report (timezone as local timezone),
-localtimenot set - timezone not specified for report,
-localtimeset - timezone not specified for report,
-localtimenot set
(may be some others I'm not thinking of)
Ideally if we can create unit tests for all of these that'd be great.
Will get working on these now, thanks Jonathon |
|
@koconnor99-aq did you get a chance to close this out? Or could you hand over to someone else to close out please? |
|
Hey Jonny I don’t get a chance to close this out. Who am I best handing off to?
Kevin O'Connor
Associate kdb+ Engineer
UK / Ireland
Sturgeon Building
Suite 5
9 - 15 Queen Street
Belfast, BT1 6EA
United States
Merrill Lynch Building
21st Floor, Suite 21099
101 Hudson Street
Jersey City, NJ 07302
Hong Kong
6 / F Alexandra House
18 Chater Road
Central
Hong Kong
Singapore
7 - 12 Manhattan House
151 Chin Swee Road
Singapore
169876
This email, its contents and any files attached are a confidential communication and are intended only for the named addressees indicated in the message.
If you are not the named addressee or if you have received this email in error, you may not, without the consent of Data Intellect, copy, use or rely on any information or attachments in any way. Please notify the sender by return email and delete it from your email system.
Unless separately agreed, Data Intellect does not accept any responsibility for the accuracy or completeness of the contents of this email or its attachments. Please note that any views, opinion or advice contained in this communication are those of the sending individual and
not those of Data Intellect and Data Intellect shall have no liability whatsoever in relation to this communication (or its content) unless separately agreed.
This e-mail message is intended to be received only by persons entitled to receive the confidential information it may contain. E-mail messages to clients of Data Intellect may contain information that is confidential and legally privileged. Please do not read, copy, forward, or
store this message unless you are an intended recipient of it. If you have received this message in error, please forward it to the sender and delete it completely from your computer system.
…________________________________
From: Jonny Press ***@***.***>
Sent: Friday, June 14, 2024 1:44:55 PM
To: DataIntellectTech/TorQ ***@***.***>
Cc: Kevin O'Connor ***@***.***>; Mention ***@***.***>
Subject: Re: [DataIntellectTech/TorQ] Tz reporter (PR #640)
@koconnor99-aq<https://github.com/koconnor99-aq> did you get a chance to close this out? Or could you hand over to someone else to close out please?
—
Reply to this email directly, view it on GitHub<#640 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A5XHCZXEASBY6MX5JXWXVCTZHLQUPAVCNFSM6AAAAABFBZ4GOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRXHE2TIOJSGE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
No description provided.