How to check day of the week in California?

I want to make a funzie badge where you have to do a specific action when it’s Friday in California’s timezone. How to check day of the week specifically on GMT-7 timezone?

1 Like

Use the HTTP Service and communicate with an external API

Didn’t test, but I believe this should work (server-side only).

local weekDayInCalifornia = DateTime.fromUnixTimestamp(workspace:GetServerTimeNow()):FormatLocalTime("dddd", "en-us")

if weekDayInCalifornia == "Friday" then

end

This one shows server’s local time, not California’s.

Then how about:

local weekDayInCalifornia = DateTime.now():FormatLocalTime("dddd", "en-us")

if weekDayInCalifornia == "Friday" then

end
1 Like