()
| 20 | * @returns {Date} A date object representing the current time in IST Timezone |
| 21 | */ |
| 22 | const getProgressDateTimestamp = () => { |
| 23 | // Currently, we are primarily catering to Indian users for our apps, which is why we have implemented support for the IST (Indian Standard Time) timezone for progress updates. |
| 24 | const currentHourIST = new Date().getUTCHours() + 5.5; // IST offset is UTC+5:30; |
| 25 | const isBefore6amIST = currentHourIST === 5.5 && new Date().getUTCMinutes() <= 30; |
| 26 | return isBefore6amIST ? new Date().setUTCHours(0, 0, 0, 0) - MILLISECONDS_IN_DAY : new Date().setUTCHours(0, 0, 0, 0); |
| 27 | }; |
| 28 | |
| 29 | /** |
| 30 | * Builds a Firestore query for posting progress documents based on the given parameters. |
no outgoing calls
no test coverage detected