Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:25
erlang
1524-snmp-Types-and-specs-for-snmp-date_and_tim...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1524-snmp-Types-and-specs-for-snmp-date_and_time-0.patch of Package erlang
From eabec53e0777134fd4c886843eed1a29fb6f6b37 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Tue, 9 Jan 2024 17:31:18 +0100 Subject: [PATCH 04/67] [snmp] Types and specs for snmp:date_and_time/0 --- lib/snmp/doc/src/snmp.xml | 8 +++----- lib/snmp/src/app/snmp.erl | 4 ++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/snmp/doc/src/snmp.xml b/lib/snmp/doc/src/snmp.xml index 03d9c8f084..e067e5a4fa 100644 --- a/lib/snmp/doc/src/snmp.xml +++ b/lib/snmp/doc/src/snmp.xml @@ -180,18 +180,16 @@ <p>The default value for <c>Type</c> is <c>normal</c>.</p> <marker id="dat"></marker> + <marker id="date_and_time"></marker> </desc> </func> <func> - <name since="">date_and_time() -> DateAndTime</name> + <name name="date_and_time" arity="0" clause_i="1" since=""/> <fsummary>Return the current date and time as an OCTET STRING</fsummary> - <type> - <v>DateAndTime = [int()]</v> - </type> <desc> <p>Returns current date and time as the data type DateAndTime, - as specified in RFC1903. This is an OCTET STRING.</p> + as specified in RFC1903. This is an OCTET STRING.</p> <marker id="dat2ut_dst"></marker> </desc> diff --git a/lib/snmp/src/app/snmp.erl b/lib/snmp/src/app/snmp.erl index 4c267760e9..c4508ebd1a 100644 --- a/lib/snmp/src/app/snmp.erl +++ b/lib/snmp/src/app/snmp.erl @@ -668,6 +668,10 @@ ms2() -> %%----------------------------------------------------------------- %% Returns: current time as a DateAndTime type (defined in rfc1903) %%----------------------------------------------------------------- + +-spec date_and_time() -> DateAndTime when + DateAndTime :: octet_string(). + date_and_time() -> UTC = calendar:universal_time(), Local = calendar:universal_time_to_local_time(UTC), -- 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