:orphan:
# TSSetTime
Allows one to reset the time.
## Synopsis
```
#include "petscts.h"
PetscErrorCode TSSetTime(TS ts, PetscReal t)
```
Logically Collective
## Input Parameters
- ***ts -*** the `TS` context obtained from `TSCreate()`
- ***time -*** the time
## See Also
[](ch_ts), `TS`, `TSGetTime()`, `TSSetMaxSteps()`
## Level
intermediate
## Location
src/ts/interface/ts.c
## Examples
src/tao/unconstrained/tutorials/burgers_spectral.c
src/tao/unconstrained/tutorials/spectraladjointassimilation.c
src/ts/tutorials/ex11.c
src/ts/tutorials/ex20opt_ic.c
src/ts/tutorials/ex20opt_p.c
src/ts/tutorials/ex40.c
src/ts/tutorials/ex41.c
src/ts/tutorials/ex50.c
src/ts/utils/dmplexlandau/tutorials/ex1.c
src/ts/utils/dmplexlandau/tutorials/ex2.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/interface/ts.c)
[Index of all TS routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)