Details
-
Skillsjs
Joined devRant on 5/26/2021
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
Timezones. So, general rules are:
1. If you don't store timezone, always use and assume UTC. Databases, backends, whatever you use, all time must be kept be in UTC.
2. If you store timezones, ensure you store them everywhere and don't drop them anywhere.
3. It's always better to ignore backend server time in favor of database's `now().` Having a single source of truth makes time consistent (if it's the same database, obviously). If you combine backend time and database time, you likely get a violation of causality.
I've just spent a couple of hours investigating "weird random one-hour time drifts on updates." Guys violated all three rules above:
- they didn't store the timezone;
- their servers had inconsistent timezones. Java was in +XX., while the server itself in UTC. On one host, they forgot to put JVM in the same timezone;
- they dropped the timezone because they thought it was the same everywhere, so there was no point in serializing it.13 -
Hello, I just want to let you know I'm working on a 15 year old product and it is currently in production.
It uses Angular.js and one of the earliest versions of React.js. I cannot use ES6, we don't have Babel, no JSX syntax, no CSS preprocessor. No webpack.
I must support browser since IE6 with an ES3 syntax. (luckily I got some some polyfills for an ES5 syntax)
When I build a component I have to call React.createClass and React.createElement.
The render() function is basically a nested pile of React.createElement.
There is no documentation for this product, no tests, no anything.
I had to reverse engineer it in order to understand how it works.
The code base uses mixed programming styles and naming conventions, plus thousands of little js files.
Oh and obviously no hot reload, every time I make a change I have to restart everything.
Please, send help.
I'm in danger.
Sincerely,
An underpaid developer
....
I'm not crying, you are crying...19