3

How would I get the current timezone in either Pharo or Amber Smalltalk?

(I’m also curious about how I would go about finding this information myself through inspecting the image somehow or however it’s typically done – huge Smalltalk newbie here.)

Edward Ocampo-Gooding
  • 2,782
  • 1
  • 23
  • 29

1 Answers1

5

Oh! I just learned how the object browser works and found this:

In Pharo:

DateAndTime localTimeZone. a TimeZone(LT-5:00)

In Amber:

Date new asTimeString. '11:55:25 GMT-0500 (EST)'

Edward Ocampo-Gooding
  • 2,782
  • 1
  • 23
  • 29
  • 2
    In Amber you can also use `Date today asTimeString`. Or you can use inline JavaScript and use the examples from http://stackoverflow.com/questions/1091372/getting-the-clients-timezone-in-javascript. Inline JavaScript is currently represented in `<>`. – MKroehnert Nov 30 '13 at 23:46