The best practice is to buy only what you know will be drunk within six months, and store the tea correctly.
For ideal storage, tea should be kept in a cool place with in an airtight, opaque container. Avoid having the lid left ajar, especially in an area that has moisture or strong aromas (such as a typical kitchen). Do not freeze or refrigerate tea.
Tea is generally good for one or two years after harvesting if it is stored well, and will not typically develop unpleasant flavors with age, but will simply lose the quality it once had. Teas vary greatly as to their rate of staling, with the better quality green teas being the most susceptible --these begin losing freshness even before the year is out.