Getting date values without applying timezone offset

33 views
Skip to first unread message

wtellis

unread,
Mar 24, 2020, 11:40:42 PM3/24/20
to dcm4che
Is it possible to get date values without applying the TimezoneOffsetFromUTC from the header?  We've encountered files where the birth date does not have the same timezone offset as the study date/time due to daylight savings (e.g. birth date is in Jan while the study date/time is in July).  This causes issue with the getDate method since it seems to apply the timezone offset from the header, resulting in Date instances that are off by one hour, e.g. the birthdate in the file is 1941-01-10, but the Date instance we get back is 1941-01-09 23:00:00

Gunter Zeilinger

unread,
Mar 25, 2020, 6:20:59 AM3/25/20
to dcm...@googlegroups.com
https://github.com/dcm4che/dcm4che/issues/699

You may workaround by using
DateUtils.parseDA(null, attrs.getString(Tag.PatientBirthDate));


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, March 25, 2020 4:40 AM, wtellis <wyatt....@gmail.com> wrote:

Is it possible to get date values without applying the TimezoneOffsetFromUTC from the header?  We've encountered files where the birth date does not have the same timezone offset as the study date/time due to daylight savings (e.g. birth date is in Jan while the study date/time is in July).  This causes issue with the getDate method since it seems to apply the timezone offset from the header, resulting in Date instances that are off by one hour, e.g. the birthdate in the file is 1941-01-10, but the Date instance we get back is 1941-01-09 23:00:00


--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.

Wyatt Tellis

unread,
Mar 25, 2020, 9:40:48 AM3/25/20
to dcm...@googlegroups.com
Thanks Gunter.

You received this message because you are subscribed to a topic in the Google Groups "dcm4che" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dcm4che/Ok_k1jr0Hg8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dcm4che+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dcm4che/PA0TldrCj8SLl9OpX-zyubohNiZV1vtyocAI-5oFPpiqSD3AtbgY_ncTu2J46gpT4CK8enILQWxrT1VbIoZAWaCJp0svl1dUEEmw1ejF1p4%3D%40protonmail.com.
Reply all
Reply to author
Forward
0 new messages