もくじ
Localeを指定する
function getParseYear(targetDay) { var japanLocaleString = new Date().toLocaleString('ja-JP', { timeZone: 'Asia/Tokyo' }); var now = new Date(japanLocaleString); var date = new Date(now.getFullYear(), now.getMonth() + 1, now.getDate() + targetDay); var year = date.getFullYear(); var month = date.getMonth(); var day = date.getDate(); var parseDate = year + "-" + month + "-" + day; return parseDate; // 2020-10-20 }
東京リージョンを指定する
const asiaTokyoRegion = 'asia-northeast1'; // Asis/Tokyo exports.updateSampleStatus = functions.region(asiaTokyoRegion).pubsub.schedule('every 1 minutes').onRun((context) => { const request = https.request(lambdaUrl, (res) => { res.on('data', (chunk) => { var result = `${chunk}`; const chunkString = chunk.toString(); const obj = JSON.parse(chunkString || "null"); ・・・
ダッシュボード