-4

Possible Duplicate:
Best way to convert epoch time to “real” date/time

I need to write a small function in C/C++ which will take epoch time stamp and time-zone as input and return "hour" part of that time-stamp. Please help.

Community
  • 1
  • 1
Amit
  • 614
  • 1
  • 7
  • 18

2 Answers2

0

Have you looked at struct tm and the localtime() function?

Alexandros
  • 3,036
  • 1
  • 22
  • 35
0

If you're talking about parsing some text into a time then extracting the hour, getdate() is likely what you're looking for.

Andrew Beals
  • 1,167
  • 8
  • 18