pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feed[pgjdbc/pgjdbc] PR #3887: fix: make all Calendar instances proleptic Gregorian (#3837)
6+ messages / 2 participants
[nested] [flat]
* [pgjdbc/pgjdbc] PR #3887: fix: make all Calendar instances proleptic Gregorian (#3837)
@ 2025-12-04 14:22 "m-van-tilburg (@m-van-tilburg)" <[email protected]>
0 siblings, 0 replies; 6+ messages in thread
From: m-van-tilburg (@m-van-tilburg) @ 2025-12-04 14:22 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
Calendar instances created with Calendar.getInstance() or new GregorianCalendar() are by default a hybrid of the Julian and the Gregorian calendar. Java classes like java.sql.Date and SimpleDateFormat also (sometimes) use Calendar instances and therefore might also be affected. This differs from the java.time classes that use the proleptic Gregorian calendar by default. The postgresql server also uses the proleptic Gregorian calendar and therefore it makes sense to make all Calendar instances in the pgjdbc code proleptic Gregorian too. This will fix #3837
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3887: fix: make all Calendar instances proleptic Gregorian (#3837)
@ 2025-12-04 14:32 ` "m-van-tilburg (@m-van-tilburg)" <[email protected]>
4 siblings, 0 replies; 6+ messages in thread
From: m-van-tilburg (@m-van-tilburg) @ 2025-12-04 14:32 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
(on pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java)
This method has been duplicated in several places, it might be a good idea to make it public here and call it from the other places if that doesn't violate any package boundaries that I am unaware of
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3887: fix: make all Calendar instances proleptic Gregorian (#3837)
@ 2025-12-04 15:01 ` "m-van-tilburg (@m-van-tilburg)" <[email protected]>
4 siblings, 0 replies; 6+ messages in thread
From: m-van-tilburg (@m-van-tilburg) @ 2025-12-04 15:01 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
(on pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java)
I did not use `new Calendar.Builder().setCalendarType("iso8601").build())` because besides resulting in a proleptic Gregorian calendar it changes other things for the Calendar instance that might have unforeseen consequences
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3887: fix: make all Calendar instances proleptic Gregorian (#3837)
@ 2025-12-04 20:20 ` "davecramer (@davecramer)" <[email protected]>
4 siblings, 0 replies; 6+ messages in thread
From: davecramer (@davecramer) @ 2025-12-04 20:20 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
(on pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java)
Yes, we can put it in util as a static method
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3887: fix: make all Calendar instances proleptic Gregorian (#3837)
@ 2025-12-05 18:44 ` "m-van-tilburg (@m-van-tilburg)" <[email protected]>
4 siblings, 0 replies; 6+ messages in thread
From: m-van-tilburg (@m-van-tilburg) @ 2025-12-05 18:44 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
(on pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java)
Changed it to a public method, used it everywhere else and gave it its own test
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3887: fix: make all Calendar instances proleptic Gregorian (#3837)
@ 2025-12-16 12:07 ` "m-van-tilburg (@m-van-tilburg)" <[email protected]>
4 siblings, 0 replies; 6+ messages in thread
From: m-van-tilburg (@m-van-tilburg) @ 2025-12-16 12:07 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
@davecramer do you have any review comments that I should address?
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2025-12-16 12:07 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-12-04 14:22 [pgjdbc/pgjdbc] PR #3887: fix: make all Calendar instances proleptic Gregorian (#3837) "m-van-tilburg (@m-van-tilburg)" <[email protected]>
2025-12-04 14:32 ` "m-van-tilburg (@m-van-tilburg)" <[email protected]>
2025-12-04 15:01 ` "m-van-tilburg (@m-van-tilburg)" <[email protected]>
2025-12-04 20:20 ` "davecramer (@davecramer)" <[email protected]>
2025-12-05 18:44 ` "m-van-tilburg (@m-van-tilburg)" <[email protected]>
2025-12-16 12:07 ` "m-van-tilburg (@m-van-tilburg)" <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox