Skip to main content
`Ctrl`+`K`

# PetscGetDate

Gets the current date.

## Synopsis

    PetscErrorCode PetscGetDate(char date[], size_t len)

Not Collective

## Input Parameter

- len - length of string to hold date

## Output Parameter

- date - the date

## Note

This function makes a system call and thus SHOULD NOT be called from an error handler.

## Developer Notes

This function is called once during `PetscInitialize()`. It stashes the timestamp, and uses it when needed. This is so that error handlers may report the date without generating possible additional system errors during the call to get the date.

## See Also

`PetscGetHostName()`

## Level

beginner

## Location

src/sys/time/fdate.c

## Examples

src/snes/tutorials/ex30.c

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages