Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.2 KiB

  1. /***
  2. *ctime64.c - convert time argument to a string
  3. *
  4. * Copyright (c) 1998-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * contains _ctime64() - convert time value to string
  8. *
  9. *Revision History:
  10. * 05-21-98 GJF Created.
  11. * 08-30-99 PML Fix function header comment.
  12. *
  13. *******************************************************************************/
  14. #include <cruntime.h>
  15. #include <time.h>
  16. #include <stddef.h>
  17. #include <tchar.h>
  18. /***
  19. *_TSCHAR *_ctime64(time) - converts a time stored as a __time64_t to a string
  20. *
  21. *Purpose:
  22. * Converts a time stored as a __time64_t to a string of the form:
  23. * Tue May 01 14:25:03 1984
  24. *
  25. *Entry:
  26. * __time64_t *time - time value in internal, 64-bit format
  27. *
  28. *Exit:
  29. * returns pointer to static string or NULL if an error occurs
  30. *
  31. *Exceptions:
  32. *
  33. *******************************************************************************/
  34. _TSCHAR * __cdecl _tctime64 (
  35. const __time64_t *timp
  36. )
  37. {
  38. struct tm *tmtemp;
  39. if ( (tmtemp = _localtime64(timp)) != NULL )
  40. return(_tasctime((const struct tm *)tmtemp));
  41. else
  42. return(NULL);
  43. }