Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
1002-Fix-type-calendar-secs_per_day-0.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1002-Fix-type-calendar-secs_per_day-0.patch of Package erlang
From 7108f397cbebd8bbfba4be96749afe5ea1843299 Mon Sep 17 00:00:00 2001 From: "Paulo F. Oliveira" <paulo.oliveira@kivra.com> Date: Wed, 28 Feb 2024 18:36:06 +0000 Subject: [PATCH] Fix type calendar:secs_per_day/0 It is spec'ed as 0..86400, for which 86400 is a constant used in other places (which is the reason we don't change the constant's value). This affects functions: - calendar:seconds_to_time/1 - calendar:time_to_seconds/1 > calendar:seconds_to_time(86399). {23,59,59} > calendar:seconds_to_time(0). {0,0,0} > calendar:time_to_seconds({23, 59, 59}). 86399 > calendar:time_to_seconds({0, 0, 0}). 86399 --- lib/stdlib/src/calendar.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stdlib/src/calendar.erl b/lib/stdlib/src/calendar.erl index e5f6477c00..d61b915459 100644 --- a/lib/stdlib/src/calendar.erl +++ b/lib/stdlib/src/calendar.erl @@ -399,7 +399,7 @@ seconds_to_daystime(Secs) -> %% %% Wraps. %% --type secs_per_day() :: 0..?SECONDS_PER_DAY. +-type secs_per_day() :: 0..86399. -spec seconds_to_time(Seconds) -> time() when Seconds :: secs_per_day(). seconds_to_time(Secs) when Secs >= 0, Secs < ?SECONDS_PER_DAY -> -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor