Skip to content
Snippets Groups Projects
Commit 925d91ee authored by Johan Schön's avatar Johan Schön
Browse files

Added print method

Rev: lib/modules/Protocols.pmod/LysKOM.pmod/ProtocolTypes.pmod:1.3
parent 691a7871
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,15 @@ class LysKOMTime
int day_of_year; // INT32
int(0..1) is_dst; // BOOL
string print(void|int long)
{
string res=sprintf("%d-%02d-%02d %02d:%02d",
1900+year,month,day,hours,minutes);
if(long)
res+=sprintf(":%02d",seconds);
return res;
}
void create(string|array ...args)
{
seconds=(int)args[0]; // INT32
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment