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
Search - "timezones"
-
She: Do dates make you nervous?
He: Oh yes, especially when the client and server are in different timezones and I need to calculate the difference and they are in different formats and I mean why can’t everyone just use ISO8601, right?
She: Okay never mind bye..........8 -
First time poster here. Please be nice :)
My biggest workaround is one that's being currently deployed to 40 truck drivers (trucking company here), preventing printers being out of usage while on the road. We also have to use HP ePrint to wirelessly print documents, but that's another story for another time I guess :)
CEO asked us to install wifi printers in our 40-ish trucks which has wifi on board. However he's always picking one of the cheapest options possible, so we got consumer grade printers (Laserjet 1002w). Those printers often disconnects without getting back on the truck wifi network EVER. I have to get physically in the truck, wire the printer via USB onto my laptop and reconfigure Wifi on it with the HP Windows tool. This means lots of printer downtime, which always happens when the drivers are three timezones away from our office
Then I thought: "What if I could sniff what HP sends via USB while I (re)configure the printer, and replay whats being sent later? Our trucks all have an Android tablet with a USB type-A connector with host capability, so I could write a small app that replays the config when plugged in by the user.
Three days of hacking around later, I have a working app. By chance, HP printers (or at least those models we have) uses HTTP POST via USB, so I could easily replay the request.
Edit: the end result is that truck drivers just plug the printer to their tablet, press "reconfigure" in a home made Android app, printer is reconnected to the truck and they're good to go. They don't have access to the network nor know enough to debug themselves anyways14 -
When interviewing a dev, ask them what they think about time zones. If their answer is "fuck time zones", hire them immediately.4
-
Every day.
I am a PHP developer.
Yeah, "another PHP is awful" rant... no, not really.
It's just unsuitable for some ambitious projects, just like Ruby and Python are.
First of all, DO NOT EVER use Laravel for large enterprise applications. The same goes for RoR, Django, and other ActiveRecord MVCs.
They are all neat frameworks for writing a todo app, as a better-than-wordpress flexible blogging solution, even as a custom webshop.
Beyond 50k daily users, Active Record becomes hell due to it's lazy fat querying habits. At more than a million users... *depressed sigh*.
PHP is also completely unsuitable for projects beyond 5M lines of code in my opinion. At more than 25M lines... *another depressed sigh*.
You can let your devs read Clean Code and books about architecture patterns, you can teach them about SOLID & DRY, you can write thousands of tests... it doesn't matter.
PHP is scaffolding, it's made of bamboo and rope. It's not brick or concrete. You can build quickly, but it only scales up to a certain point before it breaks in multiple places.
Eventually you run into patterns where even 100% test coverage still doesn't guarantee shit, because the real-life edge cases are just too complex and numerous.
When you're working on a multi-party invoicing system with adapters for various tax codes, or an availability/planning system working across timezones, or systems which implement geographical routefinding coupled to traffic, event & weather prediction...
PHP, Python, Ruby, etc are just missing types.
Every day I run into bugs which could have been prevented if you could use ADTs in a generic way in PHP. PHP7 has pretty good typehints, and they prevent a lot of messy behavior, but they aren't composable. There is no way to tell PHP "this method accepts a Collection of Users", or "this methods returns maybe either an Apple or a Pear, and I want to force the caller to handle both Apple/Pear and null".
Well, you could do that, but it requires a lot of custom classes and trickery, and you have to rewrite the same logic if you want to typehint a "Collection of Departments" instead of "Collection of Users" -- i.e., it's not composable.
Probably the biggest issue is that languages with a (mostly) structural type system (Haskell, Rust, even C#/JVM languages to some degree, etc) are much slower to develop in for the "startup" era of a project, so you grab a weak, quick prototyping language to get started.
Then, when you reach a more grown up phase, you wish you had a better type system at your disposal...28 -
Just remember, if someone ever makes a colony on Mars, you may have to support their timezone in your applications. And their day is longer, so a simple offset from UTC won’t do....14
-
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 -
Just a friendly reminder not to believe anything that you see on the internet tomorrow (today based on timezones).
...not that believing things on the internet is every really a great plan...
PS. No, Half-Life 3 is not announced, you did not see a trailer, and it is never coming out.10 -
Gf: "Why are you such a typist"
Me: "I promise not to buy more keyboards with blue switches..."
Gf: "No, I mean like being racist or sexist, but you discriminate types"
Me: "Uhhh"
Gf: "You are always bitching about how awful date/time types are, with timezones, leap seconds and daylight savings"
Me: Face turns pale, thousand yard stare, vietnam-flashback to when I was writing a calendar scheduling/meeting/matching tool which used 3 databases, with timestamps in different formats, and web frontends for people in offices around the world.
Me, with a soft broken voice: "So?"
Gf: "You've been working on that palette tool this week, and you keep talking about how interesting all these colorspaces, white balances and conversion formulas are"
Me: 🤔5 -
Me: Anytime 9am - 12 my time suits me fine.
Him: Sure, noon our time suits us fine.
Me: *talking to myself* I said no later than 12 my time, theres a 2 hour difference. FFS, uh, I'll have to cancel this, move that around, skip that, ARGH!!! fucking hell jackass ... FINE!!!
...
Him: That calendar invite is for 4pm our time, thats a little too late for us.
Me: ...... but they are 2 ..... 2 hours ahead so ..... oh, thats 10am my time .... oh shit2 -
"I decided to write the core software for my Time Machine in Java. It's Date API is so error free and easy to use."
As the legend goes, the scientist is trapped in another dimension between Timezones.
#thanksjava4 -
Elon Musk: I'm putting people on Mars!
Developers: Fantastic, more timezones to support.
Credit: @iamdevloper4 -
how to be a shitty client:
- have a legacy database where column names are misspelled and everything is nullable
- hire external help which instead of helping break the ui (bonus points for breaking the api too)
- demand a very much custom auth logic but decide to use aws cognito for shits and giggles
- demand 1hr daily meetings
- demand biometric auth with 0 knowledge of how biometric auth works (the previous devs just had a face id prompt which does nothing and retrieved email and password saved on the device???)
- message me at 2am because you don't understand how timezones work + demand a build while you're at it
- call me a "heretical pagan" because i took a day off on a holiday you don't celebrate (???)
i could go on but i think this is enough11 -
Have an awesome 2o19 from GMT+1!!
// yes I know I am a bit late
// a rant about timezones & js is in the making :P ;)2 -
Well, if your tests fails because it expects 1557525600000 instead of 1557532800000 for a date it tells you exactly: NOTHING.
Unix timestamp have their point, yet in some cases human readability is a feature. So why the fuck don't you display them not in a human readable format?
Now if you'd see:
2019-05-10T22:00:00+00:00
vs the expected
2019-05-11T00:00:00+00:00
you'd know right away that the first date is wrong by an offset of 2 hours because somebody fucked up timezones and wasn't using a UTC calculation.
So even if want your code to rely on timestamps, at least visualize your failures in a human readable way. (In most cases I argue that keeping dates as an iso string would be JUST FUCKING FINE performance-wise.)
Why do have me parse numbers? Show me the meaningful data.
Timestamps are for computers, dates are for humans.3 -
So I booted up this "very exciting, bleeding edge project" that my boss so delicately forced me to volunteer for. This is what I see:
FATAL ERROR
The internal calendar ended on Dec. 21, 2012.
... The Mayans. The Mayans built the system.1 -
Is Ubuntu have different timezones with Windows?
Always need to adjust time after switching.
*Is it just me?20 -
Don't be me. Don't miss an interview because you don't know how timezones work and at least take a look at their website if you're applying for a web dev job.4
-
Oooh what I hate it..... Timezones... Who really came up with that shit? GMT, UTC, CET and garbage like that. And then also the DST crap.
Whats wrong with the same time in the whole world? Without DST or timezone garbage that just makes life harder for both developers and travellers which are going to meet someone or have something booked.18 -
Earlier this day (or yesterday, timezones 'n stuff) I posted a "rant" about my new Project:
"The Spigot Web Framework" - a Tool that should help Owners of Minecraftservers without dedicated Webserver and knowledge about developing a website.
In the Screenshot below I show you guys, how few lines of code can make a beautiful website.
The Modulemanager is fully done and people can build their own Modules, which can be live updated.
I am currently working on "cross communication" between the Client and the Modules.
I hope you guys stay tuned!
EDIT: As mentioned in my last rant (look @comments) I will be able to pull off a standalone version of this software.18 -
WTF, timezones...
How is gmt+12 2018-04-19 02:00
But gmt-12 is 2018-04-20 02:00...
Here in gmt+1 the 20th starts one hour earlier than in gmt..
Time travel? Relativity? Rick? Illuminati?
I‘m confused..14 -
At this day, July 18 in Eastern timezones, one of the globally recognized animation studios in Japan, Kyoto Animation - more known as KyoAni, has been deliberately burned by an arsonist, and has claimed 20 lives and counting.
Please give a moment of silence for the fallen in KyoAni. All they wanted was to make people smile despite the low wage situation and Japan and this happens.8 -
Give everyone the ability to intuitively grasp the concept of unix timestamps.
No more timezones or DST, no more confusion about formats.7 -
I hate time.
Yes, that dimension which unidirectionally rushes by and makes us miss deadlines.
Also yes, that object in most programming languages which chokes to death on formatting conversions, timezones, DST transitions and leap seconds.
But above all, I hate doing chronological things from the point of view of code, because it always involves scheduling and polling of some kind, through cron jobs and queues with workers.
When the web of actions dependent on predicted future and passed past events becomes complicated, the queries become heavy... and with slow queries, queues might lock or get delayed just a little bit...
So you start caching things in faster places, figure out ways to predict worker/thread priorities and improve scheduling algorithms.
But then you start worrying about cache warming and cascading, about hashing results and flushing data, about keeping all those truths in sync...
I had a nightmare last night.
I was a watchmaker, and I had to fix a giant ticking watch, forced to run like a mouse while poking at gears.
I fucking need a break. But time ticks on...2 -
In case y'all ever need a list of available timezones for the JavaScript Internationalization API:
https://gist.github.com/AmyShackles...3 -
Thinking about creating a tech news account on devRant. A little idea that just came to my mind...
The account will contain all kinds of news! (about the tech industry of course)
So for example when a company acquires another company (IBM > RedHat, Microsoft > GitHub, etc.), a well-known website/app gets new features or a company releases a new smartphone, we will inform you here!
Of course I'd need some help if I wanted to do something like this. Especially from other timezones! (I'm im Austria/Europe)
Write a comment, if you're interested in helping out! The more people, the better!17 -
I HATE
- charsets
- missing fonts
- timezones
- text layout directions, bidi
gnaaaaaaaarh
That's it. Thank you. 🐟4 -
I work in a multinational ..time stamps everywhere without fucking Timezones..fucking Jira shit why is there no TZ on this shit…utter cunts who configured it or the software itself4
-
2 fucking AM. My phone rings.
-Hi! Oh sorry did I wake you?
-Yes...
-But its only 7 PM!! Why are you a sleep so soon???!
-Grrr... Coz we are in different timezones dumbass!
*call disconnected*1 -
Spend literally two days trying to figure out why I have a 2 hour offset in my timezones for a lamp web app. This isn't even close to my first timezone rodeo.
Check logs, reset Apache/MySQL/PHP timezones in like 100 places. Use 3rd party server side and client side timezone libraries. Moment.js you say? Shit works like a charm... but is, of course, still two hours off.
MySQL is right. PHP is right. Apache is right. PHP libs are in place. Finally convert the entire damn project to use epoch time because I have a deadline, I have no more time to read backwater AWS docs and try to figure out why the hell this Ubuntu EC2 is fucked up, and I literally cannot figure out why in the hell the damn clock is off.
Several days later notice a variable in the main .config file... right in root... 2 hour timezone offset.
Fuuuuuuuuuuuuuuuuuuuuck.8 -
I made a thing.
I then turned it into a CodeSandbox template so other people could make the thing.
I then turned it into an npm package.
The thing is a cat clock generator.
https://codesandbox.io/embed/...
https://npmjs.com/package/...3 -
So today's the day the child leaves the babysitter.
Today's the fucking day that I learn why the fuck everybody says date's are a fucking headache. Or was it yesterday? I don't know.
Fucking dates, timezones, time calculations...5 -
I came home about 1am and saw a bug in a small (unpaid...) project that had to do with timezones (see some earlier rants). Fixed it, got to bed.
A few days later I realized that a feature I implemented before was gone. Going through the git log I found out it was me in that night who removed it, by accident I suppose.
Not the end of the world but I was quite intrigued by my own drunk ability to remove a feature that had nothing to to with what I was doing and not even noticing it.2 -
Elon Musk doesn’t know what consequences his plan has 🤨
Musk: I‘m putting people on Mars!
Developers: Fantastic, more timezones to support 😑2 -
it's only 9:12 AM in the pacific northwest but hey happy new year all you people in eastern timezones7
-
All these companies not going the full 100% remote and requiring one day in the office, would it kill them to do 100% remote? My current role is fully remote and were spread through many timezones and still manage to work well, why don't companies see this and give an option atleast to be fully remote for developers?12
-
Converting server time to any given local timezone is a pain in the ass.. at least in JS.
Here's what I've got:
convertNowToTimezone = (localOffset) => {
let d = new Date();
let millis = d.getTime() + (d.getTimezoneOffset() * 60000); //convert server local time to UTC millisec
d.setTime(millis - (localOffset * 60000)); //convert UTC millisec to required local time
return d;
}
where I pass localOffset as -330 (IST offset).
Works in chrome console but gives a diff of 4min in the server side nodejs I'm running it in..
🤬🤬😡😡😡😡😡9 -
It sucks, when your clients live in a different timezone and they start to work and complaining about things just when you want to leave the office.
-
DAYLIGHT SAVING!!
Up to this point, I was indifferent to the issue if it should be kept or not. My sleep schedule is fucked and non-routine anyway so one hour plus or minus doesn't play any role.
I got to a meeting scheduling problem, when I have 2 timestamps in variable timezones and want to calculate time difference. Both can have DST active. There is no algortihmic way to figure out. I checked SO and pytz and it's just a list of hardcoded dates when DST starts and ends. WHATHTEHELL.jpg
Not only we should abolish the DST, we should force the whole world into UTC/Zulu. And those, who refuse to adapt to UTC, will be forced to work with plain integer epoch dates.3 -
I lose all respect for people trying to schedule meetings with me when they write the time zone initialism incorrectly.
It is well into EDT. EST technically means you want to meet an hour earlier and that you live in a different time zone than everyone else on the east coast of the United States. But I'm just going to assume that you don't remember that really annoying daylight savings time shit we have to do twice a year and show up in EDT. -
Moment.js, because without it, formatting and converting JS Date objects to other timezones is a bitch
-
I just spent about 30h desperately trying to figure out why my Qradar API queries were not working while running in docker, but somehow worked when running locally. I was just minimally stressed because it's my bachelor thesis, which I need to turn in in 3 weeks and this basically nuked my whole planning.
So apparently docker requires you to set your own timezone, so my API queries were always querying data from an hour early, when the requested data did not exist yet....
It's 3PM and I need a drink, or maybe 101 -
This Pull Requests requires code reviews from four different teams, and most people in those teams are in timezones where they're already off work and I just started. 😩3
-
It's amazing that we had to explain to an offshore API dev how timezones work. You'd think they know what it is by being in a different timezone, think again.3
-
I was using SimpleDateFormat and everything was great but then next thing I find out, the time offset for GMT is stored as Z and not +00:00 which is the format I needed for API calls.
Every other time zone follows a similar format but yet somebody thought it was a good idea to switch it up for GMT3 -
Spent two hours debugging my filter for truncated tweets (ending with "...") Only to find out that Twitter uses a fucking ellipsis Unicode character
*Bangs head against wall* -
Yeah sure...article 17 sucks. But the EU parliament has also decided to abandon EU summer time and I refuse to program that.3
-
Week ago, leader of the artifacts/packages storage and mirroring with animal in Logo, fucked up our testing enabling new feature on theirs SaaS.
We created a ticket, they managed to fix that, although it took them long time to do so, probably due to timezones as fix was simple click on their Admin area.
Today they forwarded us email that there will be some changes that can impact prod ...
Great timing, great .. -
When the framework you're using decides to work in UTC after 5 years of using default system timezone. And instead of giving you the option to change timezone, hardcore enforces it by:
os.environ['TZ'] = 'UTC'
time.tzset()
For people who don't know python.. It basically tells your code that your system time is set to UTC (ingnoring the right timezone)
Now we get one bug after another because of this undocumented shitty change without changes in how time fields behave in different client timezones.
😒🔫
(Don't get me wrong, using UTC is logical however not in an existening application and forcing devs to rewrite all code that handles time fields)1 -
I regularly get added by unknown people on telegram. Now, sometimes they're real people asking you to rate some hotels or put smth in a shopping basket in a specific webshop.
It's my hobby to figure out what their scam is. (I think just not paying, how would they do that anyway).
Also, you've bots. Doing acquisition and then ask you to contact them on a different number. I do this. Yolo. For fun.
But now, there's a Chinese girl that added me and I can't figure out if she's a bot or real. She did ask me to contact on a different number - like bot.. But she goes to sleep on Hong Kong timezones and I've let her tell me what was in a youtube video. She described well. Still, I don't trust.
She does have some inconsistenties in dot usage at end of sentence and stuff.
English, quite well but I think she uses translator if she's real. She said it's not her native language.
It drives me totally crazy not being able to figure out.
What are more ways to check if AI?23 -
Spent most of the day debugging a timezone related bug in a cron job.
Reminded me of this video.. Relateable.
https://youtube.com/watch/... -
FUCKING TIMEZONES. FUCKING JAVASCRIPT.
Date.parse("2019-01-01") = local time
Date.parse("2019-01-01T00:00") = UTC
Why? How's that supposed to make sense? Am I stupid? I just want UTC to be assumed for everything. Anyone? Any suggestions?4 -
Time zone just sprang into day time savings yesterday
I had a device monitoring data pollution on a roof that goes to a website. The thing didn’t fucking adjust bday the device stayed on standard time
I spent the entire day thinking what I should adjust for something that most countries don’t do any more why do we even bother with saving daylight.
In addition the timezone I wanted didn’t work right with pandas and I had to do the wrong way to get it “right”6 -
Working with dates in JavaScript is a real pain in the ass if you don't pay attention to timezones :(2
-
I've been at my new company for about a month. It's a startup that went from a dozen people last year to over two hundred right now. During the dot com era, that type of growth typically spelled disaster. It's crazy how many people I've met have only been at this shop for one to three months. Everyone is 100% remote, across multiple countries, and vast timezones.1
-
>Doesn't set timezone: Clock 2 hours behind.
>Sets timezone to Europe/Amsterdam (my timezone): Clock 1 hour ahead :|4 -
How have I not seen this in the "timezones" tag here yet? It sums up perfectly why timezones are absolute madness: https://youtube.com/watch/...
-
I never had a problem with daylight savings, that was until I tried handling it along with date and times in different time zones in Java. FML.
-
Another day, another struggle with time zones.
How many fucking helper methods do I need to create for dates and time zones? How many components, pipes and services do I need to wrap just so two datetimes line up? Apparently another one today. At this point I'm ready to accept flat earth theory if it means no more time zones. I'm fucking sold on it if so.
It's not even the time zone that's the issue. It's business needing it formatted, but also offset properly, based on your browser locale, but with points that cross into DST observing time zones of a different locale simultaneously. Sometimes those times are the same, sometimes they're different, sometimes they're different but only in winter. And despite a plethora of libraries to help with these calculations, nothing ever seems to just work out of the box. So here's to another layer of abstraction, because time zones (and DST) are bullshit.1 -
If the clock is not complicated enough, with DST and timezones.... holidays and red days is even more complicated..... (a perl sub which returns all red days for sweden. It does not return any holidays thats always saturday or sunday)
Requires Date::Calc and Date::Easter
What a mess dates and times become..,
sub GetHoliDayList() {
$yeartocheck = $_[0];
$holiday{'1-1'} = '1';
$holiday{'1-6'} = '1';
$holiday{'5-1'} = '1';
$holiday{'6-6'} = '1';
$holiday{'6-24'} = '1';
$holiday{'12-24'} = '1';
$holiday{'12-25'} = '1';
$holiday{'12-26'} = '1';
$holiday{'12-31'} = '1';
($eastermonth, $easterday) = gregorian_easter( $yeartocheck );
$hea = int($eastermonth)."-".int(int($easterday) - 2);
$heb = int($eastermonth)."-".int(int($easterday) + 1);
$holiday{$hea} = '1';
$holiday{$heb} = '1';
($year,$christskytravellermonth,$christskytravellerday) = Add_Delta_YMD($yeartocheck,$eastermonth,$easterday, 0,0,39);
$chstv = int($christskytravellermonth)."-".int($christskytravellerday);
$holiday{$chstv} = '1';
if (Day_Of_Week($yeartocheck,6,19) == 5) {
$holiday{'6-19'} = '1';
}
if (Day_Of_Week($yeartocheck,6,20) == 5) {
$holiday{'6-20'} = '1';
}
if (Day_Of_Week($yeartocheck,6,21) == 5) {
$holiday{'6-21'} = '1';
}
if (Day_Of_Week($yeartocheck,6,22) == 5) {
$holiday{'6-22'} = '1';
}
if (Day_Of_Week($yeartocheck,6,23) == 5) {
$holiday{'6-23'} = '1';
}
if (Day_Of_Week($yeartocheck,6,24) == 5) {
$holiday{'6-24'} = '1';
}
if (Day_Of_Week($yeartocheck,6,25) == 5) {
$holiday{'6-25'} = '1';
}
return %holiday;
} -
Way to go ruin a collaboration. I wanted to have fun some making a game with one of my friends, but turns out being friends doesn't correlate to making a good team. Some of you probably know this, but I've never had such an experience, not even to almost strangers
Some tips on how to kill off any motivation to work with you:
* Casually insult other peoples ideas
* Don't consider other people's point of view
* Try to talk people out of prototyping/experimenting with their OWN ideas on their OWN time
* Completely undermine their skill even though you have no basis to go on
* Never worked with this person before
* less experienced
* don't have to give estimates on a daily basis
* don't consider the fact that there are libraries that can be used to speed up things)
* Victimize yourself, because someone is "forcing you" to become the bad guy
I don't know if that person is on here and I don't care if they happen to read this. I tried to treat you with the most respect, but if you don't do the same then just fuck off.
Anyways, there goes the idea of a "no stress, no problems" game dev project, because I wanted to see if isometric view would work better than top down.
My idea to have another person to work on a project with, to keep the motivation up backfired a by lot.
Someone within european timezones up for some hobby game dev?3