Introduction

The Square Cloud servers are located in Tampa, Florida, USA. By default, the timezone is set according to this location. However, in this article, we will teach you how you can customize the timezone of your application to whichever you desire.

Getting Started

The following sections provide code examples for both Javascript and Python:

index.js
// Create a Date object
const date = new Date();
// Convert the date to a string using a specific timezone
const dateString = date.toLocaleString("pt-BR", {
  timeZone: "America/Sao_Paulo",
});
console.log(dateString); // Outputs the date and time in the "America/Sao_Paulo" timezone

If you continue to experience any issues, please don’t hesitate to contact our support team.