Skip to content

Commit

Permalink
Merge pull request #985 from rfcx/bug/parse-moment-with-right-format
Browse files Browse the repository at this point in the history
Use right date format in moment js
  • Loading branch information
rassokhina-e authored May 16, 2022
2 parents a609bba + 8c244a1 commit 862d4bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/routes/data-api/ingest.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ router.post('/recordings/create', verifyToken(), hasRole(['systemUser']), async
if (parsedData && parsedData.ARTIST && parsedData.ARTIST.startsWith('AudioMoth')) {
recordingData.recorder = 'AudioMoth';
}
const datetimeUtc = recordingData.datetime_utc;
const datetimeUtc = data.datetime;
const timezone = await model.sites.getSiteTimezoneAsync(recordingData.site_id);
const format = 'YYYY-MM-DD HH:mm:ss';
const datetimeLocal = datetimeUtc ? moment.tz(datetimeUtc, timezone).format(format) : null;
Expand Down

0 comments on commit 862d4bd

Please sign in to comment.