Skip to content
This repository has been archived by the owner on Aug 24, 2020. It is now read-only.

Migrate datetime fields to actual datetime #5

Closed
paulproteus opened this issue Aug 21, 2020 · 1 comment
Closed

Migrate datetime fields to actual datetime #5

paulproteus opened this issue Aug 21, 2020 · 1 comment

Comments

@paulproteus
Copy link
Owner

Summary

Configure the date column to be a timezone-aware datetime column.

Details

Per https://udd.debian.org/schema/udd.html#public.table.upload-history , the UDD type is timestamp with time zone.

@paulproteus
Copy link
Owner Author

Validation that this works with timezones properly.

I ran python3.8 main.py -y 2019 -m 2 to import https://lists.debian.org/debian-devel-changes/2019/02/threads.html .

There are some imports whose internal "Date" header is not in February, e.g. https://lists.debian.org/debian-devel-changes/2019/02/msg00086.html

Here you can see we find that one, along with the proper timezone.

sqlite> SELECT source,version,date FROM upload_history WHERE date < '2019-02-01' AND source='zsnapd';
zsnapd|0.7.4-1|2019-01-27 01:29:12
zsnapd|0.7.5-1|2019-01-27 03:01:39
zsnapd|0.7.6-1|2019-01-27 23:00:05
zsnapd|0.8.2-1|2019-01-31 10:56:28

Other happy results.

sqlite> SELECT source,version,date FROM upload_history WHERE date > '2019-02-01' ORDER BY date LIMIT 2;
breezy|3.0.0~bzr7260-1|2019-02-01 00:47:41
zsnapd|0.8.4-1|2019-02-01 01:13:37

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant