Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix time display emails #902

Merged
merged 6 commits into from Mar 10, 2016
Merged

Fix time display emails #902

merged 6 commits into from Mar 10, 2016

Conversation

Calvinp
Copy link
Contributor

@Calvinp Calvinp commented Feb 17, 2016

In pause emails, when an expiration time was set:

  • The timestamp displayed in a confusing way (24h clock always UTC). Now the format and timezone are configurable, and it defaults to 12h clock (but still UTC).
  • A space was missing after the timestamp. This is fixed.

Calvin Pomerantz added 2 commits February 16, 2016 14:35
…lt time format and time zone. Also the time zone is shown.
@@ -38,9 +38,13 @@

private final Optional<String> uiBaseUrl;
private final Optional<SMTPConfiguration> smtpConfiguration;
private String taskDatePattern;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make these final

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


@Inject
public MailTemplateHelpers(SandboxManager sandboxManager, SingularityConfiguration singularityConfiguration) {
taskDatePattern = singularityConfiguration.getDefaultDatePattern();
timeZone = singularityConfiguration.getTimeZone();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets follow the format of the ones below with this.x = ...

@@ -76,6 +77,8 @@
@Min(value = 1, message = "Must be positive and non-zero")
private int defaultBounceExpirationMinutes = 60;

private String mailerDatePattern = "MMM dd h:mm:ss a zzz";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should move these mailer* config fields into SMTPConfiguration

@tpetr tpetr modified the milestone: 0.4.12 Feb 23, 2016

import org.apache.commons.lang3.text.WordUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.tuple.Pair;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont think this import is necessary

ssalinas added a commit that referenced this pull request Mar 10, 2016
@ssalinas ssalinas merged commit 5b8524c into master Mar 10, 2016
@ssalinas ssalinas deleted the fix_time_display_emails branch March 10, 2016 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants