Skip to content

Commit

Permalink
fix: use correct time zone
Browse files Browse the repository at this point in the history
  • Loading branch information
derogab committed Aug 15, 2024
1 parent ef3e9e7 commit 9ccb9f8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"dependencies": {
"grammy": "^1.27.0",
"moment": "^2.30.1",
"moment-timezone": "^0.5.45",
"openai": "^4.55.7",
"postal-mime": "^2.2.6"
}
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Dependencies.
import PostalMime from 'postal-mime';
import { Bot, InputFile } from 'grammy';
import moment from 'moment';
import moment from 'moment-timezone';

import { Env } from './env';
import { llm } from './llm';
Expand Down Expand Up @@ -50,7 +50,7 @@ export default {

// Generate message.
const msg = '☎️ ' + caller + '\n'
+ '📅 ' + moment().format('YYYY-MM-DD, hh:mm') + '\n'
+ '📅 ' + moment().tz(env.TZ ? env.TZ : 'UTC').format('YYYY-MM-DD, HH:mm') + '\n'
+ '💬 `' + transcribedAudio + '`';

// Send the summary to the user.
Expand Down

0 comments on commit 9ccb9f8

Please sign in to comment.