feat: correct timezone offset on downloaded logs

This commit is contained in:
Sérgio Salgado 2021-05-25 09:54:18 +01:00 committed by Josh Harvey
parent ac3dcef35a
commit a0c77b4939
7 changed files with 74 additions and 16 deletions

View file

@ -39,12 +39,14 @@ const GET_MACHINE_LOGS_CSV = gql`
$limit: Int
$from: DateTime
$until: DateTime
$timezone: String
) {
machineLogsCsv(
deviceId: $deviceId
limit: $limit
from: $from
until: $until
timezone: $timezone
)
}
`
@ -114,8 +116,9 @@ const Logs = () => {
title="Download logs"
name={selected.name}
query={GET_MACHINE_LOGS_CSV}
args={{ deviceId }}
args={{ deviceId, timezone }}
getLogs={logs => R.path(['machineLogsCsv'])(logs)}
timezone={timezone}
/>
<Info3>{saveMessage}</Info3>
</div>