Introduction

The Square Cloud servers are located in New York, 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 facing technical difficulties, our specialized support team is available to assist you. Contact us and we'll be happy to help you resolve any issue.