# DateTime

A computing concept for representing dates and times in timestamp formats used by Internet protocols.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Linux 7.5 To Convey To User-Space Multi-Grain Timestamp Usage On Files

DevFeed: [Linux 7.5 To Convey To User-Space Multi-Grain Timestamp Usage On Files](<https://devfeed.tech/articles/linux-7-5-to-convey-to-user-space-multi-grain-timestamp-usage-on-files-123496.md>)

Original publisher: [Read original article](<https://www.phoronix.com/news/Linux-7.5-Statx-MG-TImestamp>)

Author: Michael Larabel

Published: 2026-11-09T11:08:22Z

Content type: news

Language: en

Sources: [Phoronix](<https://devfeed.tech/sources/phoronix.md>)

Topics: [Linux](<https://devfeed.tech/topics/linux.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>)

Tags: [desktop-linux](<https://devfeed.tech/tags/desktop-linux.md>), [developing](<https://devfeed.tech/tags/developing.md>), [file](<https://devfeed.tech/tags/file.md>), [files](<https://devfeed.tech/tags/files.md>), [git](<https://devfeed.tech/tags/git.md>), [linux](<https://devfeed.tech/tags/linux.md>), [linux-benchmarking](<https://devfeed.tech/tags/linux-benchmarking.md>), [linux-hardware-benchmarks](<https://devfeed.tech/tags/linux-hardware-benchmarks.md>), [linux-hardware-reviews](<https://devfeed.tech/tags/linux-hardware-reviews.md>), [linux-how-to](<https://devfeed.tech/tags/linux-how-to.md>), [linux-performance](<https://devfeed.tech/tags/linux-performance.md>), [linux-server-benchmarks](<https://devfeed.tech/tags/linux-server-benchmarks.md>), [merge](<https://devfeed.tech/tags/merge.md>), [open-source-graphics](<https://devfeed.tech/tags/open-source-graphics.md>), [patch](<https://devfeed.tech/tags/patch.md>), [phoronix](<https://devfeed.tech/tags/phoronix.md>), [phoronix-test-suite](<https://devfeed.tech/tags/phoronix-test-suite.md>), [software](<https://devfeed.tech/tags/software.md>), [timestamps](<https://devfeed.tech/tags/timestamps.md>), [ubuntu-benchmarks](<https://devfeed.tech/tags/ubuntu-benchmarks.md>), [ubuntu-hardware](<https://devfeed.tech/tags/ubuntu-hardware.md>), [vfs](<https://devfeed.tech/tags/vfs.md>)

### AI overview

Linux 7.5 is expected to add the statx attribute STATX_ATTR_MULTIGRAIN_TIMESTAMP so user-space can determine whether a file uses multigrain timestamps. The feature addresses a prior limitation: although multigrain timestamp support was merged in Linux 6.13, user-space had no way to identify its use. The patch is in the VFS.git tree and is expected to be submitted for the next Linux 7.5 merge window.

### Source excerpt

Merged for Linux 6.13 back in 2024 was multigrain timestamp support for being able to switch between coarse and fine-grained change/modification time reporting on a per-file basis. This is useful if caring about accuracy more than the once-per-jiffy timestamps on files and was originally devised as a way of addressing NFS caching issues. A limitation of multigrain timestamps though has been the lack of user-space to know whether a file's timestamps are multi-grain or not...

## Timestamp attributes are now supported in Vercel Flags

DevFeed: [Timestamp attributes are now supported in Vercel Flags](<https://devfeed.tech/articles/timestamp-attributes-are-now-supported-in-vercel-flags-66977.md>)

Original publisher: [Read original article](<https://vercel.com/changelog/timestamp-attributes-are-now-supported-in-vercel-flags>)

Author: Vincent Derks

Published: 2026-10-07T00:00:00Z

Content type: release

Language: en

Sources: [Vercel News](<https://devfeed.tech/sources/vercel-news.md>)

Topics: [DateTime](<https://devfeed.tech/topics/datetime.md>), [Vercel](<https://devfeed.tech/topics/vercel.md>)

Tags: [release](<https://devfeed.tech/tags/release.md>), [time](<https://devfeed.tech/tags/time.md>), [timezone](<https://devfeed.tech/tags/timezone.md>), [unix](<https://devfeed.tech/tags/unix.md>), [vercel](<https://devfeed.tech/tags/vercel.md>)

### AI overview

Vercel Flags now supports timestamp attributes for time-based targeting of entities. Developers can configure them in the dashboard or CLI, provide Unix epoch values in milliseconds during flag evaluation, and add rules that compare those values with selected dates and times.

### Source excerpt

Vercel Flags now supports timestamp attributes, so you can target entities by date and time. Use timestamp attributes to show a campaign page only between two dates, run a Black Friday promotion, or target users who registered before a cutoff. Configure a timestamp attribute You can configure timestamp attributes in the dashboard or via the CLI. In the Vercel dashboard, open Flags, select Entities, and create or select an entity. Add an attribute and set its data type to timestamp. Or define the attribute with the CLI: Whether you configure the attribute in the dashboard or CLI, your application must provide its value when evaluating a flag. The entity and attribute names must match your configuration, and the value must be a Unix epoch timestamp in milliseconds. This Flags SDK example passes the current time as system.time. Date.now() returns the required value in milliseconds. Keeping it inside dedupe() ensures that every flag evaluated during the same request uses the same time: Add a targeting rule In the dashboard, open the flag and add a targeting rule using the timestamp attribute. The rule compares the value from your application with a date and time you choose. Rules support is after, is at or after, is before, and is at or before. The date and time picker uses your local timezone. To add a time-based targeting rule with the CLI, use after, at-or-after, before, or at-or-before: Learn how to provide entities in code and release a flag at a specific time, or read the Flags documentation. Read more

## ClickHouse release 26.9

DevFeed: [ClickHouse release 26.9](<https://devfeed.tech/articles/clickhouse-release-26-9-59197.md>)

Original publisher: [Read original article](<https://clickhouse.com/blog/clickhouse-release-26-09>)

Author: ClickHouse

Published: 2026-09-23T00:00:00Z

Content type: release

Language: en

Sources: [ClickHouse Blog](<https://devfeed.tech/sources/clickhouse-blog.md>)

Topics: [clickhouse](<https://devfeed.tech/topics/clickhouse.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>)

Tags: [arithmetic](<https://devfeed.tech/tags/arithmetic.md>), [bug-fixes](<https://devfeed.tech/tags/bug-fixes.md>), [count](<https://devfeed.tech/tags/count.md>), [faster](<https://devfeed.tech/tags/faster.md>), [incremental](<https://devfeed.tech/tags/incremental.md>), [min](<https://devfeed.tech/tags/min.md>), [optimizations](<https://devfeed.tech/tags/optimizations.md>), [queries](<https://devfeed.tech/tags/queries.md>), [range](<https://devfeed.tech/tags/range.md>), [release](<https://devfeed.tech/tags/release.md>), [time](<https://devfeed.tech/tags/time.md>), [timezone](<https://devfeed.tech/tags/timezone.md>)

### AI overview

ClickHouse 26.9 is a release containing new features, performance optimizations, and bug fixes. Highlights include conditional LIMIT boundaries, incremental refreshes for append-only materialized views, disk spilling for high-cardinality queries, time-limited tokens, expanded PromQL support, and faster min, max, and count queries.

### Source excerpt

ClickHouse 26.9 introduces conditional LIMIT boundaries, incremental refreshes for append-only materialized views, disk spilling for DISTINCT, time-limited tokens, and faster min/max/count queries.

## PostgreSQL to SQL Field Notes: Date & Time

DevFeed: [PostgreSQL to SQL Field Notes: Date & Time](<https://devfeed.tech/articles/postgresql-to-sql-field-notes-date-time-57680.md>)

Original publisher: [Read original article](<https://devblogs.microsoft.com/azure-sql/pg-to-sql-date-time/>)

Author: Jerry Nixon

Published: 2026-09-21T22:44:58Z

Content type: tutorial

Language: en

Sources: [Azure SQL Dev Corner](<https://devfeed.tech/sources/azure-sql-dev-corner.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [sql-server](<https://devfeed.tech/topics/sql-server.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>), [SQL](<https://devfeed.tech/topics/sql.md>)

Tags: [azure-sql](<https://devfeed.tech/tags/azure-sql.md>), [dev](<https://devfeed.tech/tags/dev.md>), [developer](<https://devfeed.tech/tags/developer.md>), [microsoft-sql](<https://devfeed.tech/tags/microsoft-sql.md>), [modernize](<https://devfeed.tech/tags/modernize.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [precision](<https://devfeed.tech/tags/precision.md>), [sql-server](<https://devfeed.tech/tags/sql-server.md>), [sql-server-2025](<https://devfeed.tech/tags/sql-server-2025.md>), [t-sql](<https://devfeed.tech/tags/t-sql.md>), [time](<https://devfeed.tech/tags/time.md>)

### AI overview

This tutorial explains date and time differences developers should understand when moving from PostgreSQL to SQL Server, including timestamp types, time-zone handling, offsets, fractional-second precision, and storage behavior.

### Source excerpt

Moving from PostgreSQL to SQL Server? Learn the key differences between timestamp, timestamptz, datetime2, and datetimeoffset, including precision, time zones, offsets, and storage. The post PostgreSQL to SQL Field Notes: Date & Time appeared first on Azure SQL Dev Corner.

## What's New in PHP 8.6

DevFeed: [What's New in PHP 8.6](<https://devfeed.tech/articles/what-s-new-in-php-8-6-26631.md>)

Original publisher: [Read original article](<https://laravel-news.com/php-8-6>)

Author: Paul Redmond

Published: 2026-09-15T03:00:09Z

Content type: release

Language: en

Sources: [Laravel](<https://devfeed.tech/sources/laravel.md>)

Topics: [PHP](<https://devfeed.tech/topics/php.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>), [ISO 8601](<https://devfeed.tech/topics/iso-8601.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [closure](<https://devfeed.tech/tags/closure.md>), [feature](<https://devfeed.tech/tags/feature.md>), [function](<https://devfeed.tech/tags/function.md>), [interface](<https://devfeed.tech/tags/interface.md>), [iso](<https://devfeed.tech/tags/iso.md>), [news](<https://devfeed.tech/tags/news.md>), [php](<https://devfeed.tech/tags/php.md>), [php-8-6](<https://devfeed.tech/tags/php-8-6.md>), [precision](<https://devfeed.tech/tags/precision.md>), [properties](<https://devfeed.tech/tags/properties.md>), [release](<https://devfeed.tech/tags/release.md>)

### AI overview

An overview of PHP 8.6, scheduled for release on November 19, 2026. The article covers partial function application, the clamp() function, a nanosecond-precision Duration class, readonly property defaults, and parameter DocComments, along with the release timeline and related changes.

### Source excerpt

PHP 8.6 arrives November 19, 2026 with partial function application, a clamp() function, a Duration class, readonly property defaults, and new deprecations. The post What's New in PHP 8.6 appeared first on Laravel News. Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.

## Building a Practical Time Series Data Layer for Automotive Manufacturing

DevFeed: [Building a Practical Time Series Data Layer for Automotive Manufacturing](<https://devfeed.tech/articles/building-a-practical-time-series-data-layer-for-automotive-manufacturing-56910.md>)

Original publisher: [Read original article](<https://www.influxdata.com/blog/time-series-for-auto-manufacturing/>)

Author: Cole Bowden (InfluxData)

Published: 2026-09-09T08:00:00Z

Content type: article

Language: en

Sources: [InfluxData](<https://devfeed.tech/sources/influxdata.md>)

Topics: [Time Series](<https://devfeed.tech/topics/time-series.md>), [Database](<https://devfeed.tech/topics/database.md>), [telemetry](<https://devfeed.tech/topics/telemetry.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>)

Tags: [automotive](<https://devfeed.tech/tags/automotive.md>), [data](<https://devfeed.tech/tags/data.md>), [developer](<https://devfeed.tech/tags/developer.md>), [influxdb](<https://devfeed.tech/tags/influxdb.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [time-series](<https://devfeed.tech/tags/time-series.md>)

### AI overview

The article explains why automotive manufacturing data is a time-series workload and presents InfluxDB as a storage and query layer for continuous, timestamped sensor and production data.

### Source excerpt

Automotive manufacturing generates data at several operating cadences. Sensors and controllers emit measurements continuously. Equipment and line states change as events. Production and quality systems add context at the part, batch, shift, and plant level. Together, these records describe how a manufacturing process behaves over time. That data can support plant visibility, investigations, scrap reduction, condition monitoring, and longer-term comparison, but only if the storage and query layer can keep up with the workload. InfluxDB is a practical fit for these types of workloads because it is optimized for continuous, time-stamped data and can process, retain, and query it without requiring every system around it to be redesigned. Why automotive data is a time series workload A time series workload is, at its core, any data where you primarily store, query, and analyze it by looking at when it happened and how it progressed from one state to another. A temperature measurement in a time series workload never exists in isolation. When a device overheats, you ask how long it took to heat up, whether it had opportunities to cool down, and what that looked like over the span of five, ten, or fifty minutes. The same principles can apply to vibration, torque, current, pressure, flow, cycle state, machine availability, inspection results, alarms, and many other signals generated during vehicle and component production. Queries are written to understand what changed during a particular interval, whether a condition persisted, how one shift compared with another, or how several signals behaved around a production or quality event. Those queries tend to start with a filter on timestamps to the relevant window in which questions are being asked, narrow the data to the relevant equipment or process, and then aggregate, compare, or retrieve the latest values. The write pattern of time series data is often distinctive, too. Sensors create readings at a regular cadence, so new d

## JavaScript Intl API: Stop Formatting Dates and Numbers by Hand

DevFeed: [JavaScript Intl API: Stop Formatting Dates and Numbers by Hand](<https://devfeed.tech/articles/javascript-intl-api-stop-formatting-dates-and-numbers-by-hand-87929.md>)

Original publisher: [Read original article](<https://jsdev.space/javascript-intl-guide/>)

Author: anton liberant

Published: 2026-08-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [JavaScript Development](<https://devfeed.tech/sources/javascript-development.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>), [ISO 8601](<https://devfeed.tech/topics/iso-8601.md>)

Tags: [bugs](<https://devfeed.tech/tags/bugs.md>), [build](<https://devfeed.tech/tags/build.md>), [dynamic-data](<https://devfeed.tech/tags/dynamic-data.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [numbers](<https://devfeed.tech/tags/numbers.md>), [plural](<https://devfeed.tech/tags/plural.md>), [time](<https://devfeed.tech/tags/time.md>)

### AI overview

This tutorial shows how JavaScript's Intl APIs handle locale-sensitive formatting for dates, numbers, currencies, units, lists, relative time, plurals, and language or region names. It also recommends reusing formatter instances and explains that Intl formats dynamic data but does not translate application copy or handle every localization concern.

### Source excerpt

Learn how to use JavaScript Intl to format dates, numbers, currencies, lists, relative time, plural forms, and localized names without extra libraries.

## A revised algorithm for converting Gregorian dates to day counts

DevFeed: [A revised algorithm for converting Gregorian dates to day counts](<https://devfeed.tech/articles/counting-the-days-revisited-36232.md>)

Original publisher: [Read original article](<https://dotat.at/@/2026-08-09-rata-die.html>)

Published: 2026-08-09T02:29:48Z

Content type: article

Language: en

Sources: [Tony Finch](<https://devfeed.tech/sources/tony-finch-s-blog.md>)

Topics: [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>), [C](<https://devfeed.tech/topics/c.md>), [Code](<https://devfeed.tech/topics/code.md>), [function](<https://devfeed.tech/topics/function.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [c](<https://devfeed.tech/tags/c.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [data-type](<https://devfeed.tech/tags/data-type.md>), [function](<https://devfeed.tech/tags/function.md>), [range](<https://devfeed.tech/tags/range.md>)

### AI overview

The article revisits an algorithm for converting Gregorian dates into Julian Day numbers or related day counts such as rata die. It explains the March-based month pattern, leap-year corrections, integer arithmetic, and limitations caused by overflow in the output data type.

### Source excerpt

Many years ago I wrote about how to convert Gregorian dates to Julian Day numbers or similar counts such as rata die as used in Calendrical Calculations. This algorithm is the core of C's mktime() function that converts a broken-down date-time into linear time_t. I recently learned from Ben Joffe that I was missing a few tricks, and my old code wasn't as good as it could have been. Here's a better version (using conventional not C numbering): if m > 2 { m -= 2; } else { m += 10; y -= 1; } y*365 + y/4 - y/100 + y/400 + m*979/32 + d - 336 the main idea Julian years Gregorian correction the month pattern the epoch domains and ranges leap year test length of month the main idea There's a helpful coincidence in the Gregorian calendar. Although the month lengths aren't obviously regular, there's a repeating 5 month pattern that becomes easier to see when you start from March, as illustrated by the table below. This pattern resets at the end of February, midway through its third repeat, coincidentally at the same point that leap days occur. Thus the first line of the code above adjusts the month and year numbers so that January and February are counted at the end of the previous year, and the coincidental alignment occurs at the boundary between the adjusted year numbers. I'll explain the details of the adjustment as I discuss the relevant parts of the second line March 31 days April 30 days May 31 days June 30 days July 31 days August 31 days September 30 days October 31 days November 30 days December 31 days January 31 days February 28 or 29 Julian years The first part of the main formula counts the number of days before the start of year y, in terms of normal years and leap days. y * 365 + y / 4 The adjustment subtracts one from the year in January and February. The effect is that the leap day in year 4 is counted as a day before the start of the adjusted beginning of year 4, i.e. before March, i.e. exactly the right place. I previously combined this part of the express

## Waiting for PostgreSQL 20 - Add min() and max() aggregate support for uuid.

DevFeed: [Waiting for PostgreSQL 20 - Add min() and max() aggregate support for uuid.](<https://devfeed.tech/articles/waiting-for-postgresql-20-add-min-and-max-aggregate-support-for-uuid-33692.md>)

Original publisher: [Read original article](<https://www.depesz.com/2026/07/09/waiting-for-postgresql-20-add-min-and-max-aggregate-support-for-uuid/>)

Author: depesz

Published: 2026-07-09T12:41:14Z

Content type: article

Language: en

Sources: [select \* from depesz;](<https://devfeed.tech/sources/select-from-depesz.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>)

Tags: [aggregate](<https://devfeed.tech/tags/aggregate.md>), [btree](<https://devfeed.tech/tags/btree.md>), [max](<https://devfeed.tech/tags/max.md>), [min](<https://devfeed.tech/tags/min.md>), [order](<https://devfeed.tech/tags/order.md>), [pg20](<https://devfeed.tech/tags/pg20.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sort](<https://devfeed.tech/tags/sort.md>), [uncategorized](<https://devfeed.tech/tags/uncategorized.md>), [uuid](<https://devfeed.tech/tags/uuid.md>), [uuid-extract-timestamp](<https://devfeed.tech/tags/uuid-extract-timestamp.md>), [waiting](<https://devfeed.tech/tags/waiting.md>)

### AI overview

This article discusses a PostgreSQL patch adding min() and max() aggregate support for the uuid type. It explains that uuid is totally ordered through comparison operators and a btree operator class, and demonstrates the aggregates with UUID v7 and random UUIDs.

### Source excerpt

On 1st of July 2026, Masahiko Sawada committed patch: Add min() and max() aggregate support for uuid. The uuid type already has a full set of comparison operators and a btree operator class, so it is totally ordered. min() and max() were the only common aggregates missing for it. Add the uuid_larger() and uuid_smaller() ... Continue reading "Waiting for PostgreSQL 20 - Add min() and max() aggregate support for uuid."

## British Columbia, Time Zones, and Postgres

DevFeed: [British Columbia, Time Zones, and Postgres](<https://devfeed.tech/articles/british-columbia-time-zones-and-postgres-14479.md>)

Original publisher: [Read original article](<https://www.crunchydata.com/blog/british-columbia-and-time-zone-changes>)

Author: Christopher Winslett

Published: 2026-06-16T12:00:00Z

Content type: tutorial

Language: en

Sources: [CrunchyData Blog](<https://devfeed.tech/sources/crunchydata-blog.md>)

Topics: [DateTime](<https://devfeed.tech/topics/datetime.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>), [Ubuntu](<https://devfeed.tech/topics/ubuntu.md>)

Tags: [postgres](<https://devfeed.tech/tags/postgres.md>), [production-postgres](<https://devfeed.tech/tags/production-postgres.md>), [sql](<https://devfeed.tech/tags/sql.md>), [time](<https://devfeed.tech/tags/time.md>), [timezone](<https://devfeed.tech/tags/timezone.md>), [ubuntu](<https://devfeed.tech/tags/ubuntu.md>)

### AI overview

This article explains how British Columbia's permanent move to UTC-7 affects PostgreSQL handling of future appointments and time-zone conversions. It warns that changed time-zone rules or outdated tzdata packages can cause stored appointments to display at the wrong local time.

### Source excerpt

This year, British Column has moved to year-round Pacific Time. How does that affect date data?

## Timestamp fields in GitHub Projects

DevFeed: [Timestamp fields in GitHub Projects](<https://devfeed.tech/articles/timestamp-fields-in-github-projects-71787.md>)

Original publisher: [Read original article](<https://github.blog/changelog/2026-05-15-timestamp-fields-in-github-projects>)

Author: Allison

Published: 2026-05-15T12:55:56Z

Content type: release

Language: en

Sources: [GitHub Changelog](<https://devfeed.tech/sources/github-changelog.md>)

Topics: [GitHub](<https://devfeed.tech/topics/github.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>)

Tags: [built-in](<https://devfeed.tech/tags/built-in.md>), [created](<https://devfeed.tech/tags/created.md>), [fields](<https://devfeed.tech/tags/fields.md>), [filter](<https://devfeed.tech/tags/filter.md>), [github](<https://devfeed.tech/tags/github.md>), [github-projects](<https://devfeed.tech/tags/github-projects.md>), [project](<https://devfeed.tech/tags/project.md>), [projects](<https://devfeed.tech/tags/projects.md>), [sort](<https://devfeed.tech/tags/sort.md>), [updated](<https://devfeed.tech/tags/updated.md>), [view](<https://devfeed.tech/tags/view.md>), [work](<https://devfeed.tech/tags/work.md>)

### AI overview

GitHub Projects adds Created, Updated, and Closed timestamp fields, which can be added to any project view and used to sort or filter work. Created records when an issue, draft issue, or pull request was created; Closed records when an issue or pull request was closed. Updated tracks changes to the issue or pull request and to project fields such as status, so the same item can have different Updated timestamps in different projects. Add a field with the + control and select the timestamp from the list.

### Source excerpt

GitHub Projects now includes three built-in timestamp fields: Created, Updated, and Closed. You can add them to any project view to sort and filter work based on when it was...

## How to render timestamp with a timezone that is different from current?

DevFeed: [How to render timestamp with a timezone that is different from current?](<https://devfeed.tech/articles/how-to-render-timestamp-with-a-timezone-that-is-different-from-current-33675.md>)

Original publisher: [Read original article](<https://www.depesz.com/2026/01/27/how-to-render-timestamp-with-a-timezone-that-is-different-from-current/>)

Author: depesz

Published: 2026-01-27T09:25:04Z

Content type: tutorial

Language: en

Sources: [select \* from depesz;](<https://devfeed.tech/sources/select-from-depesz.md>)

Topics: [timezone](<https://devfeed.tech/topics/timezone.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>)

Tags: [formatting](<https://devfeed.tech/tags/formatting.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [irc](<https://devfeed.tech/tags/irc.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [timestamptz](<https://devfeed.tech/tags/timestamptz.md>), [timezone](<https://devfeed.tech/tags/timezone.md>), [to-char](<https://devfeed.tech/tags/to-char.md>), [uncategorized](<https://devfeed.tech/tags/uncategorized.md>), [utc](<https://devfeed.tech/tags/utc.md>)

### AI overview

A PostgreSQL tutorial explaining why timestamptz values are displayed in the client's local timezone and how to render a timestamp with an offset for another timezone. It presents a custom function that returns text, preserves the client timezone, and optionally applies to_char formatting.

### Source excerpt

This question appeared on IRC, and while I wasn't there while it happened, it caught my eye: " Can I not render this with timezone offset: select '2026-01-09 04:35:46.9824-08'::timestamp with time zone at time zone 'UTC'; " Returns '2026-01-09 12:35:46.9824' which is without the offset. Let's see what can be done about it. First, let's ... Continue reading "How to render timestamp with a timezone that is different from current?"

## Pop quiz: what time was it?

DevFeed: [Pop quiz: what time was it?](<https://devfeed.tech/articles/pop-quiz-what-time-was-it-20839.md>)

Original publisher: [Read original article](<https://dave.cheney.net/2025/12/18/pop-quiz-what-time-was-it>)

Author: Dave Cheney

Published: 2025-12-18T00:38:52Z

Content type: tutorial

Language: en

Sources: [Dave Cheney](<https://devfeed.tech/sources/dave-cheney.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [GitHub Copilot](<https://devfeed.tech/topics/github-copilot.md>), [AI-assisted coding](<https://devfeed.tech/topics/ai-assisted-coding.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-coding](<https://devfeed.tech/tags/ai-coding.md>), [coding](<https://devfeed.tech/tags/coding.md>), [coding-assistant](<https://devfeed.tech/tags/coding-assistant.md>), [go](<https://devfeed.tech/tags/go.md>), [time](<https://devfeed.tech/tags/time.md>)

### AI overview

A short quiz examines incorrect advice from an AI coding assistant by asking how far apart two timestamps printed by a program will be. The provided text does not include the answer.

### Source excerpt

Here's a small quiz derived from some incorrect advice from an AI coding assistant. This program prints two timestamps; will they be a. Roughly the same time (ie, the same second)b. Roughly 10 seconds apartc. Something else Answer after the fold

## What is the current time around the world? Utilizing std::chrono with time zones in C++23

DevFeed: [What is the current time around the world? Utilizing std::chrono with time zones in C++23](<https://devfeed.tech/articles/what-is-the-current-time-around-the-world-utilizing-std-chrono-with-time-zones-in-c-23-53302.md>)

Original publisher: [Read original article](<https://www.cppstories.com/2024/chrono_dates_zones/>)

Published: 2024-11-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [C++ Stories](<https://devfeed.tech/sources/c-stories.md>)

Topics: [DateTime](<https://devfeed.tech/topics/datetime.md>), [Code](<https://devfeed.tech/topics/code.md>), [gcc](<https://devfeed.tech/topics/gcc.md>)

Tags: [c-plus-plus-23](<https://devfeed.tech/tags/c-plus-plus-23.md>), [clock](<https://devfeed.tech/tags/clock.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [formatting](<https://devfeed.tech/tags/formatting.md>), [time](<https://devfeed.tech/tags/time.md>), [utc](<https://devfeed.tech/tags/utc.md>)

### AI overview

This tutorial demonstrates how to use C++20 and C++23 date and time facilities with std::chrono. It covers formatting dates and times, retrieving times in different time zones, handling daylight saving time, and using the IANA time-zone database through operating-system support.

### Source excerpt

In this blog post, we will explore handling dates using std::chrono, including time zones. We'll utilize the latest features of the library to retrieve the current time across various time zones, taking into account daylight saving time changes as well. Additionally, we will incorporate new capabilities introduced in C++23, such as enhanced printing functions and more. Let's start with the following code that prints the current date and time: #include <chrono> #include <print> int main() { auto now = std::chrono::system_clock::now(); std::print("now is {}", now); } You can run it through Compiler Explorer In my session, I'm getting the following results: Now is 2024-11-01 11:44:06.374573703 It's simple, but what time zone are we in? Can we print it in a shorter form? How can we check the time around the world? What about daylight saving time? First things first: time output. Improving the print As you can see, I used std::print from C++23, which is available in GCC 14! By default, the time point obtained from ::now() is printed with full information, but we can change it and adjust it. For example: Basic Date and Time Formatting Show just the date: {0:%F} will format the date as YYYY-MM-DD. Show time in hh:mm:ss format: {0:%T} will format the time as HH:MM:SS. Show the name of the month and/or day of the week: {0:%A, %B} will format it as Day, Month. Advanced Formatting Options Year and Month: {0:%Y}: Full year (e.g., 2024). {0:%y}: Last two digits of the year (e.g., 24). {0:%B}: Full month name (e.g., November). {0:%b}: Abbreviated month name (e.g., Nov). Day and Week: {0:%d}: Day of the month, zero-padded (e.g., 01). {0:%A}: Full weekday name (e.g., Friday). {0:%a}: Abbreviated weekday name (e.g., Fri). Time of Day: {0:%H}: Hour (24-hour clock), zero-padded (e.g., 14). {0:%I}: Hour (12-hour clock), zero-padded (e.g., 02). {0:%M}: Minute, zero-padded (e.g., 05). {0:%S}: Second, zero-padded (e.g., 09). {0:%p}: AM/PM designation. Time Zone: {0:%Z}: Time zone abbrevia

## How and when to use btree\_gist

DevFeed: [How and when to use btree\_gist](<https://devfeed.tech/articles/how-and-when-to-use-btree-gist-5062.md>)

Original publisher: [Read original article](<https://neon.com/blog/btree_gist>)

Author: George MacKerron

Published: 2024-07-08T13:29:31Z

Content type: tutorial

Language: en

Sources: [Neon Docs](<https://devfeed.tech/sources/blog-neon-docs.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Database](<https://devfeed.tech/topics/database.md>), [CSV](<https://devfeed.tech/topics/csv.md>), [data](<https://devfeed.tech/topics/data.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>)

Tags: [data](<https://devfeed.tech/tags/data.md>), [extension](<https://devfeed.tech/tags/extension.md>), [files](<https://devfeed.tech/tags/files.md>), [format](<https://devfeed.tech/tags/format.md>), [index](<https://devfeed.tech/tags/index.md>), [monitor](<https://devfeed.tech/tags/monitor.md>), [numbers](<https://devfeed.tech/tags/numbers.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [schema](<https://devfeed.tech/tags/schema.md>), [sql](<https://devfeed.tech/tags/sql.md>), [time](<https://devfeed.tech/tags/time.md>)

### AI overview

This tutorial explains how to use PostgreSQL indexes for queries combining one-dimensional and multidimensional data. It focuses on the btree_gist extension and demonstrates its use with UK crime data containing locations and reporting dates, including loading selected CSV data into PostgreSQL.

### Source excerpt

The right indexes make big SQL queries fast. If you've been using Postgres for more than 5 minutes, you're almost certainly familiar with the everyday B-Tree index. This can deal with data that has a one-dimensional ordering: numbers, timestamps, text, and so on. And if you've ha...

## How to Set Date Time from Mac Command Line

DevFeed: [How to Set Date Time from Mac Command Line](<https://devfeed.tech/articles/how-to-set-date-time-from-mac-command-line-37488.md>)

Original publisher: [Read original article](<https://davidwalsh.name/mac-set-date>)

Author: David Walsh

Published: 2024-06-17T12:01:38Z

Content type: tutorial

Language: en

Sources: [David Walsh](<https://devfeed.tech/sources/david-walsh.md>)

Topics: [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Extension](<https://devfeed.tech/topics/extension.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>)

Tags: [command-line](<https://devfeed.tech/tags/command-line.md>), [extension](<https://devfeed.tech/tags/extension.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [mac](<https://devfeed.tech/tags/mac.md>), [quick-tips](<https://devfeed.tech/tags/quick-tips.md>), [quick-tips-shell](<https://devfeed.tech/tags/quick-tips-shell.md>), [shell](<https://devfeed.tech/tags/shell.md>), [testing](<https://devfeed.tech/tags/testing.md>), [time](<https://devfeed.tech/tags/time.md>)

### AI overview

This tutorial explains how to change the current date on a Mac from the command line so developers can test hardcoded, date-based logic in web extensions that cannot be updated immediately.

### Source excerpt

Working on a web extension that ships to an app store and isn't immediately modifiable, like a website, can be difficult. Since you cannot immediately deploy updates, you sometimes need to bake in hardcoded date-based logic. Testing future dates can be difficult if you don't know how to quickly change the date on your local [...] The post How to Set Date Time from Mac Command Line appeared first on David Walsh Blog.

## How do I find out my timezone in Linux?

DevFeed: [How do I find out my timezone in Linux?](<https://devfeed.tech/articles/how-do-i-find-out-my-timezone-in-linux-41914.md>)

Original publisher: [Read original article](<https://www.cyberciti.biz/faq/find-checking-timezone-in-linux-using-command-line/>)

Author: Vivek Gite

Published: 2024-04-06T01:06:44Z

Content type: tutorial

Language: en

Sources: [nixCraft](<https://devfeed.tech/sources/nixcraft-linux-tips-hacks-tutorials-and-ideas-in-blog-format-rss-feed.md>)

Topics: [Linux](<https://devfeed.tech/topics/linux.md>), [timezone](<https://devfeed.tech/topics/timezone.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [systemd](<https://devfeed.tech/topics/systemd.md>), [Unix](<https://devfeed.tech/topics/unix.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>)

Tags: [command-line](<https://devfeed.tech/tags/command-line.md>), [easy](<https://devfeed.tech/tags/easy.md>), [environment-variables](<https://devfeed.tech/tags/environment-variables.md>), [grep-command](<https://devfeed.tech/tags/grep-command.md>), [linux](<https://devfeed.tech/tags/linux.md>), [systemd](<https://devfeed.tech/tags/systemd.md>), [timedatectl](<https://devfeed.tech/tags/timedatectl.md>), [timezone](<https://devfeed.tech/tags/timezone.md>), [unix](<https://devfeed.tech/tags/unix.md>)

### AI overview

A practical Linux tutorial explaining how to inspect the configured system and user time zones. It covers timedatectl on systemd-based distributions, timezone files, environment variables, and command-line utilities such as grep, ls, cat, less, and date.

### Source excerpt

You can find the timezone in Linux using the command line. The easiest way to do this is to type the "timedatectl" command and look for the "timezone" line when using modern Linux distros with systemd. There are other commands and ways to temporarily switch to a new timezone for date calculations. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How do I find out my timezone in Linux? appeared first on nixCraft.

## Date and Time Formatting in Kotlin with the DateTime Library

DevFeed: [Date and Time Formatting in Kotlin with the DateTime Library](<https://devfeed.tech/articles/date-and-time-formatting-in-kotlin-with-the-datetime-library-24844.md>)

Original publisher: [Read original article](<https://alexzh.com/date-and-time-formatting-in-kotlin-with-the-datetime-library/>)

Author: Alex Zhukovich

Published: 2024-03-01T13:12:08Z

Content type: tutorial

Language: en

Sources: [Alex Zhuk](<https://devfeed.tech/sources/alex-zhuk-android-development-and-testing.md>)

Topics: [DateTime](<https://devfeed.tech/topics/datetime.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Library](<https://devfeed.tech/topics/library.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>)

Tags: [guide](<https://devfeed.tech/tags/guide.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [library](<https://devfeed.tech/tags/library.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [platform](<https://devfeed.tech/tags/platform.md>), [platforms](<https://devfeed.tech/tags/platforms.md>), [pre-release](<https://devfeed.tech/tags/pre-release.md>), [time](<https://devfeed.tech/tags/time.md>)

### AI overview

This tutorial explains how to parse and format dates and times in Kotlin using the kotlinx-datetime v0.6.0-RC library. It covers locale-invariant formatting with Unicode patterns and Kotlin DSL, along with parsing formatted values into date and time types.

### Source excerpt

Explore the art of formatting date and time in Kotlin with the Kotlinx-datetime library. This guide introduces you to the efficient use of Unicode patterns and Kotlin DSL for formatting date and time types. Ideal for Kotlin Multiplatform projects.

## Nanosecond timestamp collisions are common

DevFeed: [Nanosecond timestamp collisions are common](<https://devfeed.tech/articles/nanosecond-timestamp-collisions-are-common-20754.md>)

Original publisher: [Read original article](<https://www.evanjones.ca/nanosecond-collisions.html>)

Published: 2023-07-20T21:39:42Z

Content type: article

Language: en

Sources: [Evan Jones](<https://devfeed.tech/sources/evan-jones.md>)

Topics: [DateTime](<https://devfeed.tech/topics/datetime.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>)

Tags: [go](<https://devfeed.tech/tags/go.md>), [threads](<https://devfeed.tech/tags/threads.md>), [time](<https://devfeed.tech/tags/time.md>)

### AI overview

The article reports tests of timestamp collisions using Go's absolute and monotonic clocks. It finds that raw nanosecond timestamps can collide frequently across threads and that collision behavior varies between Linux and Mac OS X.

### Source excerpt

I was wondering: how often do nanosecond timestamps collide on modern systems? The answer is: very often, like 5% of all samples, when reading the clock on all 4 physical cores at the same time. As a result, I think it is unsafe to assume that a raw nanosecond timestamp is a unique identifier. I wrote a small test program to test this. I used Go, which records both the "absolute" time and the "monotonic clock" relative time on each call to time.Now(), so I compared both the relative difference between consecutive timestamps, as well as just the absolute timestamps. As expected, the behavior depends on the system, so I observe very different results on Mac OS X and Linux. On Linux, within a single thread, both the absolute and monotonic times always increase. On my system, the minimum increment was 32 ns. Between threads, approximately 5% of the absolute times were exactly the same as other threads. Even with 2 threads on a 4 core system, approximately 2% of timestamps collided. On Mac OS X: the absolute time has microsecond resolution, so there are an astronomical number of collisions when I repeat this same test. Even within a thread I often observe the monotonic clock not increment. See the test program on Github if you are curious.

## Just the right time date predicates with Iceberg

DevFeed: [Just the right time date predicates with Iceberg](<https://devfeed.tech/articles/just-the-right-time-date-predicates-with-iceberg-8713.md>)

Original publisher: [Read original article](<https://trino.io/blog/2023/04/11/date-predicates.html>)

Author: Marius Grama

Published: 2023-04-11T00:00:00Z

Content type: article

Language: en

Sources: [Trino](<https://devfeed.tech/sources/trino-blog.md>)

Topics: [Apache Iceberg](<https://devfeed.tech/topics/apache-iceberg.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>), [SQL](<https://devfeed.tech/topics/sql.md>)

Tags: [cast](<https://devfeed.tech/tags/cast.md>), [data-lake](<https://devfeed.tech/tags/data-lake.md>), [expression](<https://devfeed.tech/tags/expression.md>), [filter](<https://devfeed.tech/tags/filter.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [partitioning](<https://devfeed.tech/tags/partitioning.md>), [performance](<https://devfeed.tech/tags/performance.md>), [range](<https://devfeed.tech/tags/range.md>), [sql](<https://devfeed.tech/tags/sql.md>)

### AI overview

This article explains how date predicates can be optimized when querying Iceberg tables in a data lake. It covers partition pruning, hidden partitioning, constant folding, predicate pushdown, range predicates, and casting to help Trino avoid scanning irrelevant data and improve query performance.

### Source excerpt

In the data lake world, data partitioning is a technique that is critical to the performance of read operations. In order to avoid scanning large amounts of data accidentally, and also to limit the number of partitions that are being processed by a query, a query engine must push down constant expressions when filtering partitions.

## ESP Insights: In-depth device metrics

DevFeed: [ESP Insights: In-depth device metrics](<https://devfeed.tech/articles/esp-insights-in-depth-device-metrics-13842.md>)

Original publisher: [Read original article](<https://developer.espressif.com/blog/esp-insights-in-depth-device-metrics/>)

Author: John Lee

Published: 2022-04-28T00:00:00Z

Content type: release

Language: en

Sources: [Blog on Developer Portal](<https://devfeed.tech/sources/blog-on-developer-portal.md>)

Topics: [dashboards](<https://devfeed.tech/topics/dashboards.md>), [Time Series](<https://devfeed.tech/topics/time-series.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [crash](<https://devfeed.tech/tags/crash.md>), [esp-insights](<https://devfeed.tech/tags/esp-insights.md>), [esp32](<https://devfeed.tech/tags/esp32.md>), [espinsights](<https://devfeed.tech/tags/espinsights.md>), [event](<https://devfeed.tech/tags/event.md>), [iot](<https://devfeed.tech/tags/iot.md>), [logs](<https://devfeed.tech/tags/logs.md>), [metrics](<https://devfeed.tech/tags/metrics.md>), [time-series](<https://devfeed.tech/tags/time-series.md>), [widget](<https://devfeed.tech/tags/widget.md>)

### AI overview

This article announces enhanced ESP Insights Dashboard device-metrics analysis. Users can select a date and time range, correlate metrics with crash and reboot events, inspect event details, and zoom into a narrower portion of a time-series graph.

### Source excerpt

In the earlier version of the ESP Insights Dashboard users could check and analyse device reported metrics, for only up to the past 3 hours. We received developer feedback that they would like to look at the metrics within a particular time frame and most importantly in the time frame around an all important event being investigated viz. a crash or a reboot.

## Proposed Europe/Oslo timezone alias change could discard pre-1970 data and break Joda-Time behavior

DevFeed: [Proposed Europe/Oslo timezone alias change could discard pre-1970 data and break Joda-Time behavior](<https://devfeed.tech/articles/big-problems-at-the-timezone-database-22010.md>)

Original publisher: [Read original article](<http://blog.joda.org/2021/09/big-problems-at-timezone-database.html>)

Author: Stephen Colebourne (noreply@blogger.com)

Published: 2021-09-25T00:55:00Z

Content type: opinion

Language: en

Sources: [Stephen Colebourne](<https://devfeed.tech/sources/stephen-colebourne.md>)

Topics: [DateTime](<https://devfeed.tech/topics/datetime.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [systems](<https://devfeed.tech/topics/systems.md>), [Operating system](<https://devfeed.tech/topics/operating-system.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [jdk](<https://devfeed.tech/tags/jdk.md>), [joda](<https://devfeed.tech/tags/joda.md>), [operating-systems](<https://devfeed.tech/tags/operating-systems.md>), [smartphones](<https://devfeed.tech/tags/smartphones.md>), [systems](<https://devfeed.tech/tags/systems.md>), [timezone](<https://devfeed.tech/tags/timezone.md>)

### AI overview

The article criticizes a proposed change to the IANA timezone database that would make Europe/Oslo an alias of Europe/Berlin because their post-1970 data matches. It argues that this could replace researched pre-1970 Oslo data with Berlin data and cause Joda-Time tests and timezone identifier handling to fail.

### Source excerpt

The last time I wrote about the timezone database on this blog, the database was under threat from a lawsuit. Fortunately that lawsuit went away relatively quickly as the company involved got the message that their action was a big mistake. Unfortunately this time the mess is internal. Paul Eggert is the project lead of the timezone database hosted at IANA, a position referred to as the TZ Coordinator. He is an expert in the field, having been involved in documenting timezone data for decades. Unfortunately, he is currently ignoring all objections to an action only he seems intent on making to solve an invented problem that only he sees as important. The database is the world's principle source of timezone information. The data is included in everything from operating systems to smartphones to programming language development kits such as the JDK. While you may never have heard of it, the sheer pervasiveness of the data makes the potential impact of change or damage pretty huge. The timezone database contains information about how clocks have varies in each region around the world. The mandate of the project is to record this information from 1970 onwards. Of course, computers being what they are, a function that returns the timezone for a given date can be passed in a pre-1970 date as well as a post-1970 one. For this, and reasons of completeness, the timezone database contains pre-1970 data as well as post-1970 data. If you go to your JDK or operating system and ask for the timezone offset for 1920-01-01 for the ID "Europe/Oslo" or "Europe/Berlin" you will get an answer: DateTimeZone oslo = DateTimeZone.forID("Europe/Oslo"); System.out.println(oslo.getOffset(new DateTime(1948, 6, 1, 12, 0))); //prints 3600000 DateTimeZone berlin = DateTimeZone.forID("Europe/Berlin"); System.out.println(berlin.getOffset(new DateTime(1948, 6, 1, 12, 0))); //prints 7200000 The proposed change is to downgrade "Europe/Oslo" to be merely an alias for "Europe/Berlin". The rationale is th

## Handling Dates & Times in SQLite

DevFeed: [Handling Dates & Times in SQLite](<https://devfeed.tech/articles/handling-dates-times-in-sqlite-30600.md>)

Original publisher: [Read original article](<https://ryanharter.com/blog/2020/09/handling-dates-times-in-sqlite/>)

Published: 2020-09-04T16:35:01Z

Content type: tutorial

Language: en

Sources: [Blogs on Ryan Harter](<https://devfeed.tech/sources/blogs-on-ryan-harter.md>)

Topics: [SQLite](<https://devfeed.tech/topics/sqlite.md>), [Database](<https://devfeed.tech/topics/database.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [timezone](<https://devfeed.tech/topics/timezone.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>)

Tags: [database](<https://devfeed.tech/tags/database.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [sql](<https://devfeed.tech/tags/sql.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>), [time](<https://devfeed.tech/tags/time.md>), [timezone](<https://devfeed.tech/tags/timezone.md>)

### AI overview

The article examines how to store dates and times in SQLite for a Kotlin app using Room. It explains that SQLite has no dedicated DateTime type and discusses problems with storing timestamps as Unix-epoch milliseconds, including timezone handling and query support.

### Source excerpt

As I've been refactoring a fairly large section of Pigment, my coloring book app for adults, I came across some SQL code which I haven't touched in a very long time and didn't seem quite right. Part of Pigment's large library of coloring books and pages are the Daily books, which are a different book each month in which a new page is released each day. The day's page is free only for the day (for non-subscribers), and then reverts to being locked once the next page is released. Users can unlock a page forever by simply starting a coloring project with it while it's free, but there is a limited window in which it's available.

## Using Dependency Injection in Python to Make Date-Dependent Code Deterministic and Testable

DevFeed: [Using Dependency Injection in Python to Make Date-Dependent Code Deterministic and Testable](<https://devfeed.tech/articles/stop-using-datetime-now-33928.md>)

Original publisher: [Read original article](<https://hakibenita.com/python-dependency-injection>)

Author: Haki Benita

Published: 2020-05-31T21:00:00Z

Content type: article

Language: en

Sources: [Haki Benita](<https://devfeed.tech/sources/haki-benita.md>)

Topics: [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Python](<https://devfeed.tech/topics/python.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [django](<https://devfeed.tech/tags/django.md>), [nondeterminism](<https://devfeed.tech/tags/nondeterminism.md>), [python](<https://devfeed.tech/tags/python.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

This article explains how dependency injection can make Python code that depends on the current date deterministic and easier to test. It uses a function returning tomorrow's date to show why hard-coded time references create fragile tests, and presents passing the reference date as an argument as an alternative to mocking or external libraries.

### Source excerpt

If you ever had a test that one day just started to fail, unprovoked, or a test that fails once every blue moon for no apparent reason, it's possible your code is relying on something that is not deterministic. In this article I describe a practical approach to dependency injection in Python that when used correctly, can eliminate nondeterminism and make your code easier to maintain and to test.

[Next page](<https://devfeed.tech/topics/datetime.md?cursor=WyIyMDIwLTA1LTMxVDIxOjAwOjAwKzAwOjAwIiwgImViZWMxNzg5LThmZjMtNDg5Ny05Zjc3LTkyZDYwNDQ0ODU1NiJd>)