SW006013 Microchip Technology, SW006013 Datasheet - Page 145

MPLAB C Compiler For DsPIC DSCs

SW006013

Manufacturer Part Number
SW006013
Description
MPLAB C Compiler For DsPIC DSCs
Manufacturer
Microchip Technology
Series
DsPIC30F/33Fr
Type
MPLAB® C Compilerr
Datasheet

Specifications of SW006013

Supported Families
DsPIC30F, DsPIC33F
Core Architecture
DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
DsPIC30F And DsPIC33F
Tool Function
Compiler
Tool Type
Compiler
Processor Series
dsPIC
Lead Free Status / RoHS Status
na
For Use With/related Products
dSPIC DSCs
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
© 2008 Microchip Technology Inc.
gmtime (Continued)
Example:
localtime
Description:
Include:
Prototype:
Argument:
Return Value:
Remarks:
Example:
#include <time.h>
#include <stdio.h> /* for printf
int main(void)
{
}
Output:
UTC time = Mon Oct 20 16:43:02 2003
Converts a value to the local time.
<time.h>
struct tm *localtime(const time_t *tod);
tod
Returns the address of the time structure.
By default, the 16-bit compiler returns the time as instruction cycles.
With this default localtime and gmtime will be equivalent except
localtime will return tm_isdst (Daylight Savings Time flag) as -1 to
indicate that the status of Daylight Savings Time is not known.
#include <time.h>
#include <stdio.h> /* for printf
int main(void)
{
}
Output:
Local time = Mon Oct 20 16:43:02 2003
time_t timer;
struct tm *newtime;
timer = 1066668182; /* Mon Oct 20 16:43:02 2003 */
newtime = gmtime(&timer);
printf("UTC time = %s\n", asctime(newtime));
time_t timer;
struct tm *newtime;
timer = 1066668182; /* Mon Oct 20 16:43:02 2003 */
newtime = localtime(&timer);
printf("Local time = %s\n", asctime(newtime));
pointer to stored time
/* for gmtime, asctime, */
/* time_t, tm
/* for localtime,
/* asctime, time_t, tm */
DS51456E-page 141
*/
*/
*/
*/

Related parts for SW006013