Hey Aaron, If you're still putting together that course, I'd be down if you could throw in a section on cron jobs. I'm learning Postgres, and your teaching style is the bomb. Can't wait to grab your course!
My personal go-to is to store dates as UTC timestamps in the database, and parse the UTC timestamp on the client side (sometimes directly, or with Date.UTC). Oh, and to never manipulate timezones (or worse, offsets)
Hello Aaron, I heard in one of your videos that you were an accountant by profession. I would like to know how you transitioned to becoming a PHP developer and working with Laravel, or if you have a video where you share this story. Best regards, and thank you for your content!
is there a way to show the offset on the final date without having to change the time zone on the session? for example, I'm in the America/Santiago timezone (currently on daylight saving time), and a former colleague made a small application using Postgres as the db and set UTC as the overall time zone (not just in the db), if I use the REST API of the app to check the records, all the dates will be on UTC with the offset "+00", if I ever added a query parameter that allowed me to show all the dates on a specific time zone (in this case America/Santiago), how can I implement that without changing the time zone on the session and still get the offset? ("-04" or "-03" depending on daylight saving)
1. Who can read and write them? 2. Unix timestamps are by defintion UTC. Let PostgreSQL do the work for you. Having each session set to the timestamp the person is residing in, everybody will be fine naively handling all timestamps.
Where do you set the origin? Greenwich was chosen in 1884 at the Meridian Conference, when the UK was the preeminent power. GMT was adopted within the UK in 1847 because of the railways. BST came in WW1 to make best use of the working day, in WW2 we had double summer time for the same reason. In an ideal world we would use 15 degrees of longitude = 1 hour, but 🤣
Who has the power to determine? And clearly, it's a good idea to have a single time zone in at least most countries. Only a few countries stretch so far east-west that several time zones are necessary. Having physics strictly determining the time zone would mean that most countries (except the very small ones) have several time zones, which would not come in handy. We have the same time zone in a lot of countries: Norway, Sweden, Denmark, Poland, Czech Republic, Slovakia, Slovenia, Germany, Austria, Italy, Switzerland, France, Luxemburg, Netherlands, Belgium, Andorra, Spain.
No need do. Let PostgreSQL handle everything for you and you'll be fine. Just make sure that every session has the time zone set to the place where the person resides running it.
Dude, when you were teaching MySQL back then, I really wished you’d do Postgres. Now that it’s happening, I’m really happy!
❤️ the universe conspired
These videos are the best. Keep pumping this content Aaron
This is set up for covering special relativity in the next video, yes?
Hey Aaron, If you're still putting together that course, I'd be down if you could throw in a section on cron jobs. I'm learning Postgres, and your teaching style is the bomb. Can't wait to grab your course!
Oh nice, added to my list!
That is a good suggestion.
My personal go-to is to store dates as UTC timestamps in the database, and parse the UTC timestamp on the client side (sometimes directly, or with Date.UTC). Oh, and to never manipulate timezones (or worse, offsets)
This was a really great sum up. Thank you very much!
aaron is the godfather
Amazing content as always!
I'm glad you're also covering Postgres.
Best wishes 🤗
Update: I joined the wait list for the course :D
full course hype
😮💨 it's coming so soon! I gotta hurry!
Hello Aaron, I heard in one of your videos that you were an accountant by profession. I would like to know how you transitioned to becoming a PHP developer and working with Laravel, or if you have a video where you share this story. Best regards, and thank you for your content!
Is the course project based? Looking forward to it
@Aaron, do you touch on PG Trunk in the course?
is there a way to show the offset on the final date without having to change the time zone on the session? for example, I'm in the America/Santiago timezone (currently on daylight saving time), and a former colleague made a small application using Postgres as the db and set UTC as the overall time zone (not just in the db), if I use the REST API of the app to check the records, all the dates will be on UTC with the offset "+00", if I ever added a query parameter that allowed me to show all the dates on a specific time zone (in this case America/Santiago), how can I implement that without changing the time zone on the session and still get the offset? ("-04" or "-03" depending on daylight saving)
What client are you using?
TablePlus!
Since when did you use Postgres
I'm a free agent now!
Comparing timestamp is also annoying in pg, I need to remove 1ms to find the same record
Can you provide an example?
Time stone 😄
8:30 base because Docker haha
haha I dont know what I was thinking
6:42 guilty as charged
gottem
Why not just store unix timestamp?
1. Who can read and write them?
2. Unix timestamps are by defintion UTC.
Let PostgreSQL do the work for you. Having each session set to the timestamp the person is residing in, everybody will be fine naively handling all timestamps.
Your background is too good.
What kind of camera do you use to film your videos? Your camera quality is on par with MKBHD and LTT, I’m in awe!
Canon R6!
October 15 is too far for me lol.
Best tip on handling time zones?
Don't.
Exactly. Let PostgreSQL do this for you. The PostgreSQL Global Developer Group are more of experts than you (and I) are.
Timezones of all things should have been a physics problem, not politics. How did that even happen?
Geeze, I dunno. It sucks though
@@aarondfrancis yes. I had to make a real estate auction site for Dubai UAE but international buyers. It was quite hell back in 2020.
Where do you set the origin? Greenwich was chosen in 1884 at the Meridian Conference, when the UK was the preeminent power. GMT was adopted within the UK in 1847 because of the railways. BST came in WW1 to make best use of the working day, in WW2 we had double summer time for the same reason. In an ideal world we would use 15 degrees of longitude = 1 hour, but 🤣
Who has the power to determine? And clearly, it's a good idea to have a single time zone in at least most countries. Only a few countries stretch so far east-west that several time zones are necessary. Having physics strictly determining the time zone would mean that most countries (except the very small ones) have several time zones, which would not come in handy.
We have the same time zone in a lot of countries: Norway, Sweden, Denmark, Poland, Czech Republic, Slovakia, Slovenia, Germany, Austria, Italy, Switzerland, France, Luxemburg, Netherlands, Belgium, Andorra, Spain.
thanks i hate timezones
No need do. Let PostgreSQL handle everything for you and you'll be fine. Just make sure that every session has the time zone set to the place where the person resides running it.
Aaron ❤️🧡💛💚🩵💙💜🤎🖤🩶🤍🩷