Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

✨ Add "Responded on" column to poll CSV export (#2510)

Luke Vella761c0dead028
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.json
index d9a4c5f07..2be53466e 100644
--- a/apps/web/public/locales/en/app.json
+++ b/apps/web/public/locales/en/app.json
@@ -540,6 +540,7 @@
"resetPasswordFooter": "Don't need to reset? <a>Back to login</a>",
"resetPasswordInvalidTokenMessage": "The password reset link is invalid or has expired. Please request a new one.",
"resetPasswordTitle": "Reset Password",
+ "respondedOn": "Responded on",
"response": "Response",
"responseOptions": "Response Options",
"revoke": "Revoke",
diff --git a/apps/web/src/components/poll/manage-poll/use-csv-exporter.ts b/apps/web/src/components/poll/manage-poll/use-csv-exporter.ts
index 72d901fa6..7b46b5706 100644
--- a/apps/web/src/components/poll/manage-poll/use-csv-exporter.ts
+++ b/apps/web/src/components/poll/manage-poll/use-csv-exporter.ts
@@ -12,9 +12,15 @@ export const useCsvExporter = () => {
return {
exportToCsv: () => {
+ // Excel only recognises a naive "YYYY-MM-DD HH:mm:ss" value (no "T", no
+ // offset) as a date, so the timezone lives in the header, not the cell.
+ // Use the IANA zone name rather than a fixed offset so the label stays
+ // correct for rows on either side of a DST change.
+ const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
const header = [
t("name"),
t("email"),
+ `${t("respondedOn", { defaultValue: "Responded on" })} (${timeZone})`,
...options.map((decodedOption) => {
const day = `${decodedOption.dow} ${decodedOption.day} ${decodedOption.month} ${decodedOption.year}`;
return decodedOption.type === "date"
@@ -26,6 +32,7 @@ export const useCsvExporter = () => {
return [
participant.name,
participant.email,
+ dayjs(participant.createdAt).format("YYYY-MM-DD HH:mm:ss"),
...poll.options.map((option) => {
const vote = participant.votes.find((vote) => {
return vote.optionId === option.id;