* Appends a given timestamp to the writer with the specified path. */
| 1025 | * Appends a given timestamp to the writer with the specified path. |
| 1026 | */ |
| 1027 | void |
| 1028 | PgbsonWriterAppendTimestamp(pgbson_writer *writer, const char *path, uint32_t pathLength, |
| 1029 | TimestampTz timestamp) |
| 1030 | { |
| 1031 | uint32_t secondsSinceEpoch = timestamptz_to_time_t(timestamp); |
| 1032 | uint32_t increment = (uint32_t) (timestamp % USECS_PER_SEC); |
| 1033 | |
| 1034 | bson_append_timestamp(&(writer->innerBson), path, pathLength, secondsSinceEpoch, |
| 1035 | increment); |
| 1036 | } |
| 1037 | |
| 1038 | |
| 1039 | /* |
no outgoing calls
no test coverage detected