diff --git a/frontend/src/components/tables/TournamentsTable.tsx b/frontend/src/components/tables/TournamentsTable.tsx index 6a78f4b61..f7656b158 100644 --- a/frontend/src/components/tables/TournamentsTable.tsx +++ b/frontend/src/components/tables/TournamentsTable.tsx @@ -52,7 +52,7 @@ const TournamentsTable: React.FC = ({ { header: "Date", key: "display_date", - value: (tour) => dateTime(tour.display_date).shortDateStr, + value: (tour) => dateTime(tour.display_date).zeroOffsetShortStr, }, { header: "Eligible?", diff --git a/frontend/src/content/bc25java.ts b/frontend/src/content/bc25java.ts index 5bb593e10..96b988b0d 100644 --- a/frontend/src/content/bc25java.ts +++ b/frontend/src/content/bc25java.ts @@ -79,6 +79,8 @@ Check [debugging tips](/bc25java/debugging_tips) if you experience problems whil ### RUNNING BATTLECODE FROM THE CLIENT Open the client as described in Step 3. Navigate to the runner tab, select which bots and maps to run, and hit Run Game! Finally, click the play/pause button to view the replay. You can run games directly from the terminal with the gradle task \`./gradlew run -Pmaps=[map] -PteamA=[Team A] -PteamB=[Team B]\`. If you don't include the map or team flags, Battlecode will default to whatever is listed in \`gradle.properties\`. Running the same gradle task from your IDE will also work. + +Note that you can also use the web client located at [https://play.battlecode.org/bc25java/client](/bc25java/client) if you are having issues running the client locally. `, }; @@ -305,13 +307,12 @@ Known errors, with solutions: If your error is not listed above, ask on [the Discord](https://discord.gg/N86mxkH). `, - // "Client Issues": ` + "Client Issues": ` - // If you're experiencing memory problems with the client, please try: +If you're experiencing memory problems with the client, please try: - // - Making .bc25 files with the engine directly and uploading them to the client's match queue, rather than using the client's runner. With this method, once the web version of the visualizer is live, you can just use the web version at [https://play.battlecode.org/clients/bc25/index.html](https://play.battlecode.org/clients/bc25/index.html) rather than the desktop application. - // `, - // TODO: what was the web client??? + - Making .bc25 files with the engine directly and uploading them to the client's match queue, rather than using the client's runner. The web client can be found at [https://play.battlecode.org/bc25java/client](https://play.battlecode.org/bc25java/client) and can be used in place of the desktop application. + `, "Other Issues": ` - *After an update, IntelliJ doesn't recognize new API functions (e.g. \`rc.getMapWidth\`).* You need to refresh dependencies. Right-click on the project name (most likely \`battlecode25-scaffold\`) in the Gradle Tool Window (the right-hand sidebar), and click \`Refresh Gradle Dependencies\`. It is good to do this after every update. - You can enable auto-updates in IntelliJ by navigating to \`settings > build, execution, deployment > Gradle\` and checking \`Automatically import this project on changes in build script files\`, or the button that says something similar if you have an older version. @@ -341,7 +342,9 @@ export const TOURNAMENTS: Partial> = { Battlecode 2025 Java will have several tournaments throughout the month! We stream and commentate all tournaments online. The deadline to submit code for each non-final tournament is usually 7 pm EST *the day before* the tournament. - `, + +Please note that **all times on this page are in your current time zone**. Refer to the submission freeze countdown timer for the time remaining before the next submission freeze. +`, Prizes: ` Prize amounts are approximate and will be finalized soon! diff --git a/frontend/src/content/bc25python.ts b/frontend/src/content/bc25python.ts index 6c312c982..ae739272c 100644 --- a/frontend/src/content/bc25python.ts +++ b/frontend/src/content/bc25python.ts @@ -48,6 +48,8 @@ Check [debugging tips](/bc25python/debugging_tips) if you experience problems wh ### RUNNING BATTLECODE FROM THE CLIENT Open the client as described in Step 3. Navigate to the runner tab, select which bots and maps to run, and hit Run Game! Finally, click the play/pause button to view the replay. You can run games directly from the terminal with the gradle task \`./run.py run --maps [map] --p1 [player 1 name] --p2 [player 2 name]\`. If you don't include the map or team flags, Battlecode will default to an example player and example map. + +Note that you can also use the web client located at [https://play.battlecode.org/bc25python/client](/bc25python/client) if you are having issues running the client locally. `, }; @@ -85,6 +87,12 @@ export const DEBUGGINGTIPS: Partial> = { export const COMMONISSUES: Partial> = { "Installation Issues": `Installation issue fixes coming soon! If you run into any issues, please let us know in the Discord!`, + "Client Issues": ` + +If you're experiencing memory problems with the client, please try: + + - Making .bc25 files with the engine directly and uploading them to the client's match queue, rather than using the client's runner. The web client can be found at [https://play.battlecode.org/bc25python/client](/bc25python/client) and can be used in place of the desktop application. + `, }; export const TOURNAMENTS: Partial> = { @@ -93,6 +101,7 @@ export const TOURNAMENTS: Partial> = { The deadline to submit code for each non-final tournament is usually 7 pm EST *the day before* the tournament. + Please note that **all times on this page are in your current time zone**. Refer to the submission freeze countdown timer for the time remaining before the next submission freeze. `, Prizes: ` Battlecode 2025 Python will have several tournaments throughout the month! We stream and commentate all tournaments online. diff --git a/frontend/src/utils/dateTime.ts b/frontend/src/utils/dateTime.ts index 465900996..be58d9c8c 100644 --- a/frontend/src/utils/dateTime.ts +++ b/frontend/src/utils/dateTime.ts @@ -4,6 +4,8 @@ * localTimezone: "EDT", * localFullString: "Saturday, October 14, 2023 at 2:37 PM EDT" * shortDateStr: "10/14/2023" + * localShortStr: "10/14/2023 at 2:37 PM EDT" + * zeroOffsetShortStr: "10/14/2023" */ interface DateTimeStrings { estDateStr: string; @@ -11,6 +13,8 @@ interface DateTimeStrings { localTimezone: string; localFullString: string; shortDateStr: string; + localShortStr: string; + zeroOffsetShortStr: string; } export const dateTime = (date: Date): DateTimeStrings => { @@ -19,15 +23,31 @@ export const dateTime = (date: Date): DateTimeStrings => { timeStyle: "short", dateStyle: "full", }); + const localDateStr = date.toLocaleString([], { timeStyle: "short", dateStyle: "full", }); + const localTimezone = date .toLocaleTimeString("en-us", { timeZoneName: "short" }) .split(" ")[2]; - const shortDateStr = date.toLocaleDateString("en-US"); + const shortDateStr = date.toLocaleDateString("en-US", { timeZone: "EST" }); + + const localShortStr = date.toLocaleTimeString("en-US", { + timeZone: "EST", + timeZoneName: "short", + month: "2-digit", + day: "2-digit", + year: "numeric", + hour: "2-digit", + minute: "2-digit", + }); + + const zeroOffsetShortStr = date.toLocaleDateString("en-US", { + timeZone: "UTC", + }); return { estDateStr, @@ -35,5 +55,7 @@ export const dateTime = (date: Date): DateTimeStrings => { localTimezone, localFullString: `${localDateStr} ${localTimezone}`, shortDateStr, + localShortStr, + zeroOffsetShortStr, }; }; diff --git a/frontend/src/views/Client.tsx b/frontend/src/views/Client.tsx index 564e3833f..44c43ac08 100644 --- a/frontend/src/views/Client.tsx +++ b/frontend/src/views/Client.tsx @@ -53,7 +53,7 @@ const Client: React.FC = () => { )} {opponent?.teamname ?? "???"} - {dateTime(match.created).shortDateStr} + {dateTime(match.created).localShortStr} ), diff --git a/frontend/src/views/Tournament.tsx b/frontend/src/views/Tournament.tsx index 7b69d799f..7776c750c 100644 --- a/frontend/src/views/Tournament.tsx +++ b/frontend/src/views/Tournament.tsx @@ -99,7 +99,7 @@ const TournamentPage: React.FC = () => {

Tournament Date:

- {dateTime(tourneyData.data.display_date).localFullString} + {dateTime(tourneyData.data.display_date).zeroOffsetShortStr}

Eligible?: