Is there a way in the 2nd generation of Cloud Function to set a different timezone inside a Cloud Storage Trigger?
Take this example code
export const resizeImage = onObjectFinalized({
region: 'southamerica-east1'
}, async (event: CloudEvent<StorageObjectData>) => {
const fileBucket = event.data.bucket; // Storage bucket containing the file.
const filePath = event.data.name as string; // File path in the bucket.
const contentType = event.data.contentType as string; // File content type
const now = new Date()
console.log(now)
})
In my case, I’d like to set the timezone of this cloud function to “Argentina/Buenos Aires”