timecvt.c File Reference

TIME CONVERSION. More...

#include "pgrl.h"
#include "time.h"
Include dependency graph for timecvt.c:

Go to the source code of this file.

Macros

#define DefaultTimeZone   -3L
 

Functions

long dostounix (struct date *d, struct time *t)
 
void unixtodos (long time, struct date *d, struct time *t)
 

Variables

bank1 long timezone = DefaultTimeZone * 60L * 60L
 
static const char Days [12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
 

Detailed Description

TIME CONVERSION.

This file is part of JADEKU Portable ADQ device for Routines Control.

Copyright (C) 2002-2009, Hernan Monserrat hemonserrat<at>gmail<dot>com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file timecvt.c.

Macro Definition Documentation

◆ DefaultTimeZone

#define DefaultTimeZone   -3L

Definition at line 26 of file timecvt.c.

Function Documentation

◆ dostounix()

long dostounix ( struct date d,
struct time t 
)

converts date and time to UNIX time format

Parameters
d- date struct to convert t - time struct to convert
Returns
UNIX version of the given date and time.
Remarks
Converts a date and time (as returned from getdate and gettime) into UNIX-format time.

Definition at line 40 of file timecvt.c.

Here is the caller graph for this function:

◆ unixtodos()

void unixtodos ( long  time,
struct date d,
struct time t 
)

converts from UNIX-format time

Parameters
time- time in Unix format. d - date struct to store conversion t - time struct to store conversion
Remarks
Converts a UNIX-format time into date and time.

Definition at line 82 of file timecvt.c.

Here is the caller graph for this function:

Variable Documentation

◆ Days

const char Days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
static

Definition at line 30 of file timecvt.c.

◆ timezone

bank1 long timezone = DefaultTimeZone * 60L * 60L

Definition at line 28 of file timecvt.c.