Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
7147-snmp-Types-and-specs-for-snmp-date_and_tim...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 7147-snmp-Types-and-specs-for-snmp-date_and_time_to_unive.patch of Package erlang
From 8181fcfee351af2e3d8a88fd086ae024b43227c7 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Wed, 10 Jan 2024 10:14:57 +0100 Subject: [PATCH 07/67] [snmp] Types and specs for snmp:date_and_time_to_universal_time_dst/1 --- lib/snmp/doc/src/snmp.xml | 15 ++++++--------- lib/snmp/src/app/snmp.erl | 10 ++++++++-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/snmp/doc/src/snmp.xml b/lib/snmp/doc/src/snmp.xml index e91e0eb83b..c0d4aab246 100644 --- a/lib/snmp/doc/src/snmp.xml +++ b/lib/snmp/doc/src/snmp.xml @@ -242,25 +242,22 @@ as specified in RFC1903. This is an OCTET STRING.</p> <marker id="dat2ut_dst"></marker> + <marker id="date_and_time_to_universal_time_dst"></marker> </desc> </func> <func> - <name since="">date_and_time_to_universal_time_dst(DateAndTime) -> [utc()]</name> + <name name="date_and_time_to_universal_time_dst" arity="1" clause_i="1" since=""/> <fsummary>Convert a DateAndTime value to a list of possible utc()</fsummary> - <type> - <v>DateAndTime = [int()]</v> - <v>utc() = {{Y,Mo,D},{H,M,S}}</v> - </type> <desc> <p>Converts a DateAndTime list to a list of possible universal - time(s). The universal time value on the same format as defined in - calendar(3). </p> + time(s). The universal time value on the same format as defined in + calendar(3). </p> <marker id="dat2s"></marker> <marker id="date_and_time_to_string"></marker> - <marker id="date_and_time_to_string_1"></marker> - <marker id="date_and_time_to_string_2"></marker> + <marker id="date_and_time_to_string1_1"></marker> + <marker id="date_and_time_to_string1_2"></marker> </desc> </func> diff --git a/lib/snmp/src/app/snmp.erl b/lib/snmp/src/app/snmp.erl index 4bb3a03364..d46a77b93e 100644 --- a/lib/snmp/src/app/snmp.erl +++ b/lib/snmp/src/app/snmp.erl @@ -148,7 +148,7 @@ -type snmp_timer() :: #snmp_incr_timer{}. -type atl_type() :: read | write | read_write. --type verbosity() :: info | log | debug | trace | silence. +-type verbosity() :: silence | info | log | debug | trace. -type engine_id() :: string(). -type tdomain() :: transportDomainUdpIpv4 | transportDomainUdpIpv6. @@ -173,7 +173,8 @@ -type pdu() :: #pdu{}. -type trappdu() :: #trappdu{}. -type pdu_type() :: 'get-request' | 'get-next-request' | 'get-response' | - 'set-request' | 'trap' | 'get-bulk-request' | 'inform-request' | + 'set-request' | 'trap' | 'get-bulk-request' | + 'inform-request' | 'report'. %% We should really specify all of these, but they are so numerous... @@ -797,6 +798,11 @@ local_time_to_date_and_time_dst(Local) -> [date_and_time(Local, UTC1), date_and_time(Local, UTC2)] end. + +-spec date_and_time_to_universal_time_dst(DAT) -> UTCs when + DAT :: rfc1903_date_and_time(), + UTCs :: [calendar:datetime1970()]. + date_and_time_to_universal_time_dst([Y1, Y2, Mo, D, H, M, S, _Ds]) -> %% Local time specified, convert to UTC Local = {{y(Y1,Y2), Mo, D}, {H, M, S}}, -- 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