Computer
Meta Is Laying Off Employees After 2023's 'Year of Efficiency'
Read more of this story at Slashdot.
Parents Take School To Court After Student Punished For Using AI
Read more of this story at Slashdot.
Tinkerers Are Taking Old Redbox Kiosks Home and Reverse Engineering Them
Read more of this story at Slashdot.
Apple Headset Stalls, Struggles To Attract Killer Apps in First Year
Read more of this story at Slashdot.
Credit Cards Don't Require Signatures. So Why Do We Still Sign?
Read more of this story at Slashdot.
TV Ads To Target Households on Individual Streets in UK
Read more of this story at Slashdot.
Smart Gardening Firm's Shutdown a Reminder of Internet of Things' Fickle Nature
Read more of this story at Slashdot.
Man Sues Town for $647 Million Over Trashed Bitcoin Hard Drive
Read more of this story at Slashdot.
People Think They Already Know Everything They Need To Make Decisions
Read more of this story at Slashdot.
'A Nobel For the Big Big Questions'
Read more of this story at Slashdot.
Digital River Runs Dry
Read more of this story at Slashdot.
FTC Takes on Subscription Traps With 'Click To Cancel' Rule
Read more of this story at Slashdot.
Amazon Finally Has a Color Kindle
Read more of this story at Slashdot.
Amazon Joins Push For Nuclear Power To Meet Data Center Demand
Read more of this story at Slashdot.
Open-sourcing of WinAmp Goes Badly As Owners Delete Entire Repo
Read more of this story at Slashdot.
Discord Disputes DMCA Subpoena, Rejects Role As 'Anti-Piracy' Partner
Read more of this story at Slashdot.
Sustainable Building Effort Reaches New Heights With Wooden Skyscrapers
Read more of this story at Slashdot.
First Section of Euclid Space Telescope's Map of the Universe Revealed
Read more of this story at Slashdot.
CodeSOD: Time to Change
Dennis found this little nugget in an application he inherited.
function myTime(){ $utc_str = gmdate("M d Y H:i:s", time()); $utc = strtotime($utc_str); return $utc; }time() returns the current time as a Unix timestamp. gmdate then formats that, with the assumption that the time is in GMT. strtotime then parses that string back into a timestamp, and returns that timestamp.
Notably, PHP pins the Unix timestamp to UTC+00:00, aka GMT. So this function takes a time, formats it, parses the format to get what should be the same time back.
And we call the function myTime because of course we do. When reinventing a wheel, but square, please do let everyone know that it's yours.
[Advertisement] Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.Petroleum Drilling Technology Is Now Making Carbon-Free Power
Read more of this story at Slashdot.